From: Roger Dingledine Date: Wed, 13 Apr 2016 05:30:29 +0000 (-0400) Subject: use the new function here too X-Git-Tag: tor-0.2.8.3-alpha~16^2^2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59da060f10e6abd1681ad00dddd4410d52ce1781;p=thirdparty%2Ftor.git use the new function here too --- diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index e90603e16b..4a9b36771b 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -865,21 +865,8 @@ update_consensus_networkstatus_downloads(time_t now) && i == usable_consensus_flavor()) { /* Check if we're already downloading a usable consensus */ - int consens_conn_count = - connection_dir_count_by_purpose_and_resource( - DIR_PURPOSE_FETCH_CONSENSUS, - resource); - int connect_consens_conn_count = - connection_dir_count_by_purpose_resource_and_state( - DIR_PURPOSE_FETCH_CONSENSUS, - resource, - DIR_CONN_STATE_CONNECTING); - - /* If not all connections are "connecting", then some are - * downloading. We want to have at most one downloading at a time. */ - if (connect_consens_conn_count < consens_conn_count) { + if (networkstatus_consensus_is_already_downloading(resource)) continue; - } /* Make multiple connections for a bootstrap consensus download. */ update_consensus_bootstrap_multiple_downloads(now, options,