[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Add some (notice, for now) log messages that imply confusin...



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv829/src/or

Modified Files:
	directory.c routerlist.c 
Log Message:
Add some (notice, for now) log messages that imply confusing things are happening.

Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.278
retrieving revision 1.279
diff -u -d -r1.278 -r1.279
--- directory.c	15 Sep 2005 06:15:31 -0000	1.278
+++ directory.c	15 Sep 2005 21:11:48 -0000	1.279
@@ -1002,6 +1002,7 @@
 
   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 @@
       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);
       }

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.295
retrieving revision 1.296
diff -u -d -r1.295 -r1.296
--- routerlist.c	15 Sep 2005 14:39:05 -0000	1.295
+++ routerlist.c	15 Sep 2005 21:11:48 -0000	1.296
@@ -2397,6 +2397,8 @@
       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 @@
 
   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 @@
       /* 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 @@
     return;
   }
 
-  log_fn(LOG_NOTICE, "Launching request for routers: %s", resource);
   directory_get_from_dirserver(DIR_PURPOSE_FETCH_SERVERDESC,resource,1);
   tor_free(resource);
 }