[tor-commits] [tor/master] Make control port download status next attempts consistent

nickm at torproject.org nickm at torproject.org
Fri Sep 15 12:13:00 UTC 2017


commit 61b5d053580410775a94fc24394a607642258ebd
Author: teor <teor2345 at gmail.com>
Date:   Fri Sep 15 14:11:34 2017 +1000

    Make control port download status next attempts consistent
    
    Make download status next attempts reported over the control port
    consistent with the time used by tor. This issue only occurs if a
    download status has not been reset before  it is queried over the
    control port.
    
    Fixes 23525, not in any released version of tor.
---
 changes/bug23525 | 6 ++++++
 src/or/control.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/changes/bug23525 b/changes/bug23525
new file mode 100644
index 000000000..3a9c766c3
--- /dev/null
+++ b/changes/bug23525
@@ -0,0 +1,6 @@
+  o Minor bugfixes (control port):
+    - Make download status next attempts reported over the control port
+      consistent with the time used by tor. This issue only occurs if a
+      download status has not been reset before it is queried over the
+      control port.
+      Fixes 23525, not in any released version of tor.
diff --git a/src/or/control.c b/src/or/control.c
index ce2a4c8cf..b5dc87b83 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2158,7 +2158,7 @@ download_status_to_string(const download_status_t *dl)
 
   if (dl) {
     /* Get some substrings of the eventual output ready */
-    format_iso_time(tbuf, dl->next_attempt_at);
+    format_iso_time(tbuf, download_status_get_next_attempt_at(dl));
 
     switch (dl->schedule) {
       case DL_SCHED_GENERIC:



More information about the tor-commits mailing list