]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
don't lie about bootstrap progress when clients use bridges
authorRoger Dingledine <arma@torproject.org>
Tue, 8 Oct 2013 15:50:53 +0000 (11:50 -0400)
committerRoger Dingledine <arma@torproject.org>
Tue, 8 Oct 2013 15:50:53 +0000 (11:50 -0400)
we were listing 50% as soon as we got a bridge's relay descriptor,
even if we didn't have any consensus, certificates, etc yet.

changes/bug9922 [new file with mode: 0644]
src/or/directory.c
src/or/relay.c

diff --git a/changes/bug9922 b/changes/bug9922
new file mode 100644 (file)
index 0000000..1953800
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes:
+    - When clients use bridges, [...] Fixes bug 9922; bugfix on [...]
+
index 45992e88bfedc923c0c5272e5e4df3673cb0edd0..8c242d8e71d660039e07fcd5f6a4381ace864cbc 100644 (file)
@@ -1639,8 +1639,9 @@ load_downloaded_routers(const char *body, smartlist_t *which,
 
   added = router_load_routers_from_string(body, NULL, SAVED_NOWHERE, which,
                                   descriptor_digests, buf);
-  control_event_bootstrap(BOOTSTRAP_STATUS_LOADING_DESCRIPTORS,
-                          count_loading_descriptors_progress());
+  if (general)
+    control_event_bootstrap(BOOTSTRAP_STATUS_LOADING_DESCRIPTORS,
+                            count_loading_descriptors_progress());
   return added;
 }
 
index 010dd1dbf49f6cfd5984632f1e3bf30c2778c4bc..b2695ceec8740270f1a97e34e5b252952855198b 100644 (file)
@@ -1106,8 +1106,9 @@ connection_edge_process_relay_cell_not_open(
           control_event_bootstrap(BOOTSTRAP_STATUS_LOADING_STATUS, 0);
           break;
         case DIR_PURPOSE_FETCH_SERVERDESC:
-          control_event_bootstrap(BOOTSTRAP_STATUS_LOADING_DESCRIPTORS,
-                                  count_loading_descriptors_progress());
+          if (TO_DIR_CONN(dirconn)->router_purpose == ROUTER_PURPOSE_GENERAL)
+            control_event_bootstrap(BOOTSTRAP_STATUS_LOADING_DESCRIPTORS,
+                                    count_loading_descriptors_progress());
           break;
       }
     }