summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-07-22 21:20:23 +0000
committerNick Mathewson <nickm@torproject.org>2004-07-22 21:20:23 +0000
commit0c990259dec0ba48efda20cb4b0e58cd2965ec3f (patch)
treef0e804d190df29ff2f729601a25ce5136491ed42
parentd07d0a4e6b2380917f72c1cd3a63de665ee7da69 (diff)
downloadtor-0c990259dec0ba48efda20cb4b0e58cd2965ec3f.tar.gz
tor-0c990259dec0ba48efda20cb4b0e58cd2965ec3f.zip
Add noisy debug log to hunt for bug in router_update_status_from_smartlist
svn:r2107
-rw-r--r--src/or/routerlist.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index bd445602ad..5b3d81890f 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -831,8 +831,27 @@ void router_update_status_from_smartlist(routerinfo_t *router,
{
int n_names, i, running, approved;
const char *name;
- running = approved = 0;
+#if 1
+ char *cp;
+ int n;
+ n = 0;
+ for (i=0; i<smartlist_len(running_list); ++i) {
+ name = smartlist_get(running_list, i);
+ n += strlen(name) + 1;
+ }
+ cp = tor_malloc(n+2);
+ cp[0] = '\0';
+ for (i=0; i<smartlist_len(running_list); ++i) {
+ name = smartlist_get(running_list, i);
+ strlcat(cp, name, n);
+ strlcat(cp, " ", n);
+ }
+ log_fn(LOG_DEBUG, "Updating status of %s from list \"%s\"",
+ router->nickname, cp);
+ tor_free(cp);
+#endif
+ running = approved = 0;
n_names = smartlist_len(running_list);
for (i=0; i<n_names; ++i) {
name = smartlist_get(running_list, i);