Bladeren bron

r12057@catbus: nickm | 2007-03-04 13:58:32 -0500
Clarify some log messages; note others that could be improved later.


svn:r9724

Nick Mathewson 17 jaren geleden
bovenliggende
commit
70e5a83a77
5 gewijzigde bestanden met toevoegingen van 17 en 9 verwijderingen
  1. 4 1
      ChangeLog
  2. 2 0
      src/or/directory.c
  3. 7 5
      src/or/main.c
  4. 1 1
      src/or/router.c
  5. 3 2
      src/or/routerlist.c

+ 4 - 1
ChangeLog

@@ -1,8 +1,11 @@
 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):

+ 2 - 0
src/or/directory.c

@@ -1056,6 +1056,7 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
     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 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
         (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.",

+ 7 - 5
src/or/main.c

@@ -536,11 +536,13 @@ conn_close_if_marked(int i)
         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,

+ 1 - 1
src/or/router.c

@@ -944,7 +944,7 @@ router_rebuild_descriptor(int force)
   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 =

+ 3 - 2
src/or/routerlist.c

@@ -1322,8 +1322,9 @@ router_get_by_nickname(const char *nickname, int warn_if_unnamed)
         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;