[or-cvs] r9724: Clarify some log messages; note others that could be improve (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Sun Mar 4 18:58:41 UTC 2007


Author: nickm
Date: 2007-03-04 13:58:38 -0500 (Sun, 04 Mar 2007)
New Revision: 9724

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/or/directory.c
   tor/trunk/src/or/main.c
   tor/trunk/src/or/router.c
   tor/trunk/src/or/routerlist.c
Log:
 r12057 at catbus:  nickm | 2007-03-04 13:58:32 -0500
 Clarify some log messages; note others that could be improved later.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r12057] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-03-04 11:27:49 UTC (rev 9723)
+++ tor/trunk/ChangeLog	2007-03-04 18:58:38 UTC (rev 9724)
@@ -1,9 +1,12 @@
 Changes in version 0.1.2.10-rc - 2007-03-??
-  o Major bugfixes (Windows)
+  o Major bugfixes (Windows):
     - Do not load the NT services library functions (which may not exist)
       just to detect if we're a service trying to shut down.
 
+  o Minor bugfixes (other):
+    - Clarify a couple of log messages.
 
+
 Changes in version 0.1.2.9-rc - 2007-03-02
   o Major bugfixes (Windows):
     - On MinGW, use "%I64u" to printf/scanf 64-bit integers, instead

Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c	2007-03-04 11:27:49 UTC (rev 9723)
+++ tor/trunk/src/or/directory.c	2007-03-04 18:58:38 UTC (rev 9724)
@@ -1056,6 +1056,7 @@
     log_info(LD_DIR,"Received networkstatus objects (size %d) from server "
              "'%s:%d'",(int) body_len, conn->_base.address, conn->_base.port);
     if (status_code != 200) {
+      /* XXXX This warning tends to freak out clients who get a 403. */
       log_warn(LD_DIR,
            "Received http status code %d (%s) from server "
            "'%s:%d' while fetching \"/tor/status/%s\". I'll try again soon.",
@@ -1133,6 +1134,7 @@
         (status_code == 400 && !strcmp(reason, "Servers unavailable."));
       /* 404 means that it didn't have them; no big deal.
        * Older (pre-0.1.1.8) servers said 400 Servers unavailable instead. */
+      /* XXXX This warning tends to freak out clients who get a 403. */
       log_fn(dir_okay ? LOG_INFO : LOG_WARN, LD_DIR,
              "Received http status code %d (%s) from server '%s:%d' "
              "while fetching \"/tor/server/%s\". I'll try again soon.",

Modified: tor/trunk/src/or/main.c
===================================================================
--- tor/trunk/src/or/main.c	2007-03-04 11:27:49 UTC (rev 9723)
+++ tor/trunk/src/or/main.c	2007-03-04 18:58:38 UTC (rev 9724)
@@ -536,11 +536,13 @@
         severity = LOG_INFO;
       else
         severity = LOG_NOTICE;
-      /* XXXX012 rewrite this error message; it generates lots of worried
-       * support requests. */
-      log_fn(severity, LD_NET, "Something wrong with your network connection? "
-             "We tried to write %d bytes to addr %s (fd %d, type %s, state %d)"
-             " but timed out. (Marked at %s:%d)",
+      /* XXXX Maybe allow this to happen a certain amount per hour; it usually
+       * is meaningless. */
+      log_fn(severity, LD_NET, "We stalled too much while trying to write %d "
+             "bytes to addr %s.  If this happens a lot, either "
+             "something is wrong with your network connection, or "
+             "something is wrong with theirs. "
+             "(fd %d, type %s, state %d, marked at %s:%d).",
              (int)buf_datalen(conn->outbuf),
              escaped_safe_str(conn->address), conn->s,
              conn_type_to_string(conn->type), conn->state,

Modified: tor/trunk/src/or/router.c
===================================================================
--- tor/trunk/src/or/router.c	2007-03-04 11:27:49 UTC (rev 9723)
+++ tor/trunk/src/or/router.c	2007-03-04 18:58:38 UTC (rev 9724)
@@ -944,7 +944,7 @@
   ri->cache_info.signed_descriptor_body = tor_malloc(8192);
   if (router_dump_router_to_string(ri->cache_info.signed_descriptor_body, 8192,
                                    ri, get_identity_key())<0) {
-    log_warn(LD_BUG, "Couldn't allocate string for descriptor.");
+    log_warn(LD_BUG, "Bug: Couldn't generate router descriptor.");
     return -1;
   }
   ri->cache_info.signed_descriptor_len =

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-03-04 11:27:49 UTC (rev 9723)
+++ tor/trunk/src/or/routerlist.c	2007-03-04 18:58:38 UTC (rev 9724)
@@ -1322,8 +1322,9 @@
         char fp[HEX_DIGEST_LEN+1];
         base16_encode(fp, sizeof(fp),
                       best_match->cache_info.identity_digest, DIGEST_LEN);
-        log_warn(LD_CONFIG, "You specified a server \"%s\" by name, but the "
-             "directory authorities do not have a binding for this nickname. "
+        log_warn(LD_CONFIG, "You specified a server \"%s\" by name, but this "
+             "name is not registered, so it could be used by any server, "
+             "not just the one you meant. "
              "To make sure you get the same server in the future, refer to "
              "it by key, as \"$%s\".", nickname, fp);
         rs->name_lookup_warned = 1;



More information about the tor-commits mailing list