mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Add noisy debug log to hunt for bug in router_update_status_from_smartlist
svn:r2107
This commit is contained in:
parent
d07d0a4e6b
commit
0c990259de
@ -831,8 +831,27 @@ void router_update_status_from_smartlist(routerinfo_t *router,
|
|||||||
{
|
{
|
||||||
int n_names, i, running, approved;
|
int n_names, i, running, approved;
|
||||||
const char *name;
|
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);
|
n_names = smartlist_len(running_list);
|
||||||
for (i=0; i<n_names; ++i) {
|
for (i=0; i<n_names; ++i) {
|
||||||
name = smartlist_get(running_list, i);
|
name = smartlist_get(running_list, i);
|
||||||
|
Loading…
Reference in New Issue
Block a user