]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Don't say "downloading 1 descriptor, 4 at a time"
authorNick Mathewson <nickm@torproject.org>
Tue, 23 May 2017 13:47:11 +0000 (09:47 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 23 May 2017 13:47:11 +0000 (09:47 -0400)
Fixes bug 19648, bugfix on 0.1.1.8-alpha.

changes/bug19648 [new file with mode: 0644]
src/or/routerlist.c

diff --git a/changes/bug19648 b/changes/bug19648
new file mode 100644 (file)
index 0000000..e8c2a6a
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes (logging):
+    - When logging the number of descriptors we intend to download per
+      directory request, do not log a number higher than then the
+      number of descriptors we're fetching in total. Fixes bug 19648;
+      bugfix on 0.1.1.8-alpha.
index a790265afb6291c56b6a6abf54fd9c40bed61ac2..b7ed87aba6a0045762431807578530e07a57646c 100644 (file)
@@ -5054,8 +5054,9 @@ launch_descriptor_downloads(int purpose,
   if (n_per_request > max_dl_per_req)
     n_per_request = max_dl_per_req;
 
-  if (n_per_request < MIN_DL_PER_REQUEST)
-    n_per_request = MIN_DL_PER_REQUEST;
+  if (n_per_request < MIN_DL_PER_REQUEST) {
+    n_per_request = MIN(MIN_DL_PER_REQUEST, n_downloadable);
+  }
 
   if (n_downloadable > n_per_request)
     req_plural = rtr_plural = "s";