]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
r15847@catbus: nickm | 2007-10-16 10:15:07 -0400
authorNick Mathewson <nickm@torproject.org>
Tue, 16 Oct 2007 14:25:13 +0000 (14:25 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 16 Oct 2007 14:25:13 +0000 (14:25 +0000)
 Fix the simpler bit of bug 529: update routerinfo_t.is_named from the consensus.

svn:r11983

src/or/networkstatus.c

index 57d951325f6120b4878ec36b2c54e249309b7427..89e9231d7ce7bf10d54ae6fc9919fa5b9862c2e9 100644 (file)
@@ -1173,6 +1173,7 @@ routers_update_status_from_consensus_networkstatus(smartlist_t *routers,
     }
     if (r>0) {
       /* We have no routerstatus for this router. Skip it. */
+      router->is_named = 0;
       continue;
     }
     tor_assert(r==0);
@@ -1191,6 +1192,10 @@ routers_update_status_from_consensus_networkstatus(smartlist_t *routers,
       router->is_possible_guard = rs->is_possible_guard;
       router->is_exit = rs->is_exit;
       router->is_bad_exit = rs->is_bad_exit;
+      if (rs->is_named && !strcasecmp(router->nickname, rs->nickname))
+        router->is_named = 1;
+      else
+        router->is_named = 0;
     }
     if (router->is_running && ds) {
       download_status_reset(&ds->v2_ns_dl_status);