aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-09-15 21:11:48 +0000
committerNick Mathewson <nickm@torproject.org>2005-09-15 21:11:48 +0000
commit05bab28c7d9a60d14b2bd880b793e645eb6cc3cd (patch)
tree35ab4f64c5ab42f4dc8224e7727be3383e0177e1 /src
parent51da58eccf9405d5dbd5e000dfaa76335caf749d (diff)
downloadtor-05bab28c7d9a60d14b2bd880b793e645eb6cc3cd.tar.gz
tor-05bab28c7d9a60d14b2bd880b793e645eb6cc3cd.zip
Add some (notice, for now) log messages that imply confusing things are happening.
svn:r5076
Diffstat (limited to 'src')
-rw-r--r--src/or/directory.c5
-rw-r--r--src/or/routerlist.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 6901a1719d..993d77c88e 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1002,6 +1002,7 @@ connection_dir_client_reached_eof(connection_t *conn)
if (conn->purpose == DIR_PURPOSE_FETCH_SERVERDESC) {
smartlist_t *which = NULL;
+ int n_asked_for = 0;
/* XXXX NM implement this. */
log_fn(LOG_INFO,"Received server info (size %d) from server '%s:%d'",
(int)body_len, conn->address, conn->port);
@@ -1022,9 +1023,13 @@ connection_dir_client_reached_eof(connection_t *conn)
if (n && strlen(smartlist_get(which,n-1))==HEX_DIGEST_LEN+2)
((char*)smartlist_get(which,n-1))[HEX_DIGEST_LEN] = '\0';
}
+ if (which)
+ n_asked_for = smartlist_len(which);
router_load_routers_from_string(body, 0, which);
directory_info_has_arrived(time(NULL),0);
if (which) {
+ log_fn(LOG_NOTICE, "Received %d/%d routers.",
+ n_asked_for-smartlist_len(which), n_asked_for);
if (smartlist_len(which)) {
dir_routerdesc_download_failed(which);
}
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 9c1e1d0c3b..9c744ff79c 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2397,6 +2397,8 @@ router_list_downloadable(void)
if (memcmp(ri->signed_descriptor_digest,rs->descriptor_digest,DIGEST_LEN)
&& rs->published_on > ri->published_on) {
char *d = tor_malloc(HEX_DIGEST_LEN+1);
+ log_fn(LOG_INFO, "A networkstatus implies '%s' is out-of-date.",
+ ri->nickname);
base16_encode(d, HEX_DIGEST_LEN+1, ri->identity_digest, DIGEST_LEN);
smartlist_add(superseded, d);
break;
@@ -2438,6 +2440,7 @@ update_router_descriptor_downloads(time_t now)
if (!networkstatus_list || smartlist_len(networkstatus_list)<2) {
resource = tor_strdup("all.z");
+ log_fn(LOG_NOTICE, "Launching request for all routers");
} else {
smartlist_t *downloadable = router_list_downloadable();
if (smartlist_len(downloadable)) {
@@ -2446,6 +2449,8 @@ update_router_descriptor_downloads(time_t now)
/* Damn, that's an ugly way to do this. XXXX011 NM */
resource = tor_malloc(r_len);
tor_snprintf(resource, r_len, "fp/%s.z", dl);
+ log_fn(LOG_NOTICE, "Launching request for %d routers",
+ smartlist_len(downloadable));
tor_free(dl);
}
SMARTLIST_FOREACH(downloadable, char *, c, tor_free(c));
@@ -2457,7 +2462,6 @@ update_router_descriptor_downloads(time_t now)
return;
}
- log_fn(LOG_NOTICE, "Launching request for routers: %s", resource);
directory_get_from_dirserver(DIR_PURPOSE_FETCH_SERVERDESC,resource,1);
tor_free(resource);
}