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

[or-cvs] Resolve/expand some XXXXs and improve a log message or two



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

Modified Files:
	directory.c main.c routerlist.c routerparse.c 
Log Message:
Resolve/expand some XXXXs and improve a log message or two

Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.281
retrieving revision 1.282
diff -u -d -r1.281 -r1.282
--- directory.c	16 Sep 2005 04:52:53 -0000	1.281
+++ directory.c	16 Sep 2005 16:41:45 -0000	1.282
@@ -994,7 +994,6 @@
   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);
     if (status_code != 200) {
@@ -1318,7 +1317,8 @@
              *cp++ = '\n';
            });
         *cp = '\0';
-        /* XXXX NM This could be way more efficiently handled. */
+        /* XXXX This could be way more efficiently handled; let's see if it
+         * shows up under oprofile. */
         if (tor_gzip_compress(&compressed, &compressed_len,
                               inp, cp-inp, ZLIB_METHOD)<0) {
           tor_free(inp);

Index: main.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.553
retrieving revision 1.554
diff -u -d -r1.553 -r1.554
--- main.c	15 Sep 2005 05:41:30 -0000	1.553
+++ main.c	16 Sep 2005 16:41:45 -0000	1.554
@@ -533,12 +533,9 @@
 directory_info_has_arrived(time_t now, int from_cache)
 {
   or_options_t *options = get_options();
-  /* XXXX011 NM Update this to reflect new directories.  In particular, we
-   * can't start building circuits until we have descriptors and networkstatus
-   * docs.*/
 
   if (!router_have_minimum_dir_info()) {
-    log_fn(LOG_NOTICE, "I know too little.");
+    log_fn(LOG_NOTICE, "I learned some more directory information, but not enough to build a circuit.");
     return;
   }
 

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.298
retrieving revision 1.299
diff -u -d -r1.298 -r1.299
--- routerlist.c	16 Sep 2005 04:53:28 -0000	1.298
+++ routerlist.c	16 Sep 2005 16:41:45 -0000	1.299
@@ -856,7 +856,7 @@
 
   SMARTLIST_FOREACH(routerlist->routers, routerinfo_t *, router,
   {
-    /* XXXX001 NM Should this restrict by Named rouers, or warn on
+    /* XXXX011 NM Should this restrict by Named rouers, or warn on
      * non-named routers, or something? */
     if (0 == strcasecmp(router->nickname, nickname) ||
         (maybedigest && 0 == memcmp(digest, router->identity_digest,
@@ -1727,7 +1727,7 @@
     needed = n_running_dirservers;
 
   if (needed)
-    /* XXXX001 Downgrade to info NM */
+    /* XXXX011 Downgrade to info NM */
     log_fn(LOG_NOTICE, "For %d/%d running directory servers, we have %d live"
            " network-status documents. Downloading %d.",
            n_running_dirservers, n_dirservers, n_live, needed);
@@ -2344,7 +2344,7 @@
       router->is_running = (n_running > n_recent/2);
 
       if (router->is_running && ds) {
-        /* XXXX001 NM Hm. What about authorities? When do they reset
+        /* XXXX011 NM Hm. What about authorities? When do they reset
          * n_networkstatus_failures? */
         ds->n_networkstatus_failures = 0;
       }
@@ -2448,7 +2448,7 @@
     if (smartlist_len(downloadable)) {
       char *dl = smartlist_join_strings(downloadable,"+",0,NULL);
       size_t r_len = smartlist_len(downloadable)*(HEX_DIGEST_LEN+1)+16;
-      /* Damn, that's an ugly way to do this. XXXX011 NM */
+      /* XXXX Damn, that's an ugly way to do this. */
       resource = tor_malloc(r_len);
       tor_snprintf(resource, r_len, "fp/%s.z", dl);
       log_fn(LOG_NOTICE, "Launching request for %d routers",

Index: routerparse.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerparse.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -d -r1.141 -r1.142
--- routerparse.c	15 Sep 2005 05:19:38 -0000	1.141
+++ routerparse.c	16 Sep 2005 16:41:45 -0000	1.142
@@ -413,7 +413,9 @@
   smartlist_t *tokens = NULL;
   crypto_pk_env_t *declared_key = NULL;
 
-  /* XXXX011 This could be simplified a lot! NM */
+  /* XXXX This could be simplified a lot, but it will all go away
+   * once pre-0.1.1.8 is obsolete, and for now it's better not to
+   * tuoch it. */
 
   if (router_get_dir_hash(str, digest)) {
     log_fn(LOG_WARN, "Unable to compute digest of directory");
@@ -1148,7 +1150,7 @@
     log_fn(LOG_WARN, "Couldn't find network-status-version keyword");
     goto err;
   }
-  /* XXXX do something with the version? NM */
+  /* XXXX011 do something with the version! NM */
 
   if (!(tok = find_first_by_keyword(tokens, K_DIR_SOURCE))) {
     log_fn(LOG_WARN, "Couldn't find dir-source keyword");