[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r13173: when we're counting how many descriptors to not download, be (tor/trunk/src/or)



Author: arma
Date: 2008-01-17 23:47:03 -0500 (Thu, 17 Jan 2008)
New Revision: 13173

Modified:
   tor/trunk/src/or/routerlist.c
Log:
when we're counting how many descriptors to not download, be a
little bit more accurate


Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2008-01-18 04:42:22 UTC (rev 13172)
+++ tor/trunk/src/or/routerlist.c	2008-01-18 04:47:03 UTC (rev 13173)
@@ -3821,6 +3821,10 @@
         }
         continue; /* We have it already. */
       }
+      if (digestmap_get(map, rs->descriptor_digest)) {
+        ++n_inprogress;
+        continue; /* We have an in-progress download. */
+      }
       if (!download_status_is_ready(&rs->dl_status, now,
                                     MAX_ROUTERDESC_DOWNLOAD_FAILURES)) {
         ++n_delayed; /* Not ready for retry. */
@@ -3835,10 +3839,6 @@
         ++n_wouldnt_use;
         continue; /* We would never use it ourself. */
       }
-      if (digestmap_get(map, rs->descriptor_digest)) {
-        ++n_inprogress;
-        continue; /* We have an in-progress download. */
-      }
       smartlist_add(downloadable, rs->descriptor_digest);
     });