[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Don't say "downloading 1 descriptor, 4 at a time"
commit 994595ae5d0bc5e72bdeb9a2e7889b9f52b8b3c8
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue May 23 09:47:11 2017 -0400
Don't say "downloading 1 descriptor, 4 at a time"
Fixes bug 19648, bugfix on 0.1.1.8-alpha.
---
changes/bug19648 | 5 +++++
src/or/routerlist.c | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/changes/bug19648 b/changes/bug19648
new file mode 100644
index 0000000..e8c2a6a
--- /dev/null
+++ b/changes/bug19648
@@ -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.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index a790265..b7ed87a 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -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";
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits