[or-cvs] Downgrade a few INFO level logs to DEBUG again. Also add t...

Peter Palfrader weasel at seul.org
Mon Oct 17 16:21:44 UTC 2005


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

Modified Files:
	command.c connection.c connection_or.c cpuworker.c directory.c 
	dirserv.c onion.c router.c 
Log Message:
Downgrade a few INFO level logs to DEBUG again.  Also add two or three new
logs in cases where a calling function's log was downgraded and we wouldn't
get any log message otherwise.


Index: command.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/command.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -d -r1.95 -r1.96
--- command.c	17 Oct 2005 02:13:36 -0000	1.95
+++ command.c	17 Oct 2005 16:21:41 -0000	1.96
@@ -283,7 +283,7 @@
   circ = circuit_get_by_circid_orconn(cell->circ_id, conn);
 
   if (!circ) {
-    log_fn(LOG_INFO,"unknown circuit %d on connection from %s:%d. Dropping.",
+    log_fn(LOG_DEBUG,"unknown circuit %d on connection from %s:%d. Dropping.",
            cell->circ_id, conn->address, conn->port);
     return;
   }

Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.411
retrieving revision 1.412
diff -u -d -r1.411 -r1.412
--- connection.c	17 Oct 2005 03:17:29 -0000	1.411
+++ connection.c	17 Oct 2005 16:21:41 -0000	1.412
@@ -1209,7 +1209,7 @@
                conn->nickname ? conn->nickname : "not set", conn->address);
         return -1;
       case TOR_TLS_ERROR:
-        log_fn(LOG_INFO,"tls error. breaking (nickname %s, address %s).",
+        log_fn(LOG_DEBUG,"tls error. breaking (nickname %s, address %s).",
                conn->nickname ? conn->nickname : "not set", conn->address);
         return -1;
       case TOR_TLS_WANTWRITE:

Index: connection_or.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection_or.c,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -d -r1.192 -r1.193
--- connection_or.c	17 Oct 2005 01:29:28 -0000	1.192
+++ connection_or.c	17 Oct 2005 16:21:41 -0000	1.193
@@ -172,7 +172,7 @@
   tor_assert(conn->type == CONN_TYPE_OR);
   tor_assert(conn->state == OR_CONN_STATE_CONNECTING);
 
-  log_fn(LOG_INFO,"OR connect() to router at %s:%u finished.",
+  log_fn(LOG_DEBUG,"OR connect() to router at %s:%u finished.",
          conn->address,conn->port);
 
   if (get_options()->HttpsProxy) {

Index: cpuworker.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/cpuworker.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- cpuworker.c	23 Sep 2005 00:04:44 -0000	1.87
+++ cpuworker.c	17 Oct 2005 16:21:41 -0000	1.88
@@ -163,7 +163,7 @@
       circ = circuit_get_by_circid_orconn(circ_id, p_conn);
 
     if (success == 0) {
-      log_fn(LOG_INFO,"decoding onionskin failed. Closing.");
+      log_fn(LOG_DEBUG,"decoding onionskin failed. Closing.");
       if (circ)
         circuit_mark_for_close(circ);
       goto done_processing;
@@ -266,7 +266,7 @@
       if (onion_skin_server_handshake(question, onion_key, last_onion_key,
           reply_to_proxy, keys, CPATH_KEY_MATERIAL_LEN) < 0) {
         /* failure */
-        log_fn(LOG_INFO,"onion_skin_server_handshake failed.");
+        log_fn(LOG_DEBUG,"onion_skin_server_handshake failed.");
         memset(buf,0,LEN_ONION_RESPONSE); /* send all zeros for failure */
       } else {
         /* success */

Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.309
retrieving revision 1.310
diff -u -d -r1.309 -r1.310
--- directory.c	17 Oct 2005 02:32:33 -0000	1.309
+++ directory.c	17 Oct 2005 16:21:41 -0000	1.310
@@ -844,7 +844,7 @@
              abs(delta)/60, delta>0 ? "behind" : "ahead");
       skewed = 1; /* don't check the recommended-versions line */
     } else {
-      log_fn(LOG_INFO, "Time on received directory is within tolerance; we are %d seconds skewed.  (That's okay.)", delta);
+      log_fn(LOG_DEBUG, "Time on received directory is within tolerance; we are %d seconds skewed.  (That's okay.)", delta);
     }
   }
 
@@ -1576,7 +1576,7 @@
   tor_assert(conn->type == CONN_TYPE_DIR);
   tor_assert(conn->state == DIR_CONN_STATE_CONNECTING);
 
-  log_fn(LOG_INFO,"Dir connection to router %s:%u established.",
+  log_fn(LOG_DEBUG,"Dir connection to router %s:%u established.",
          conn->address,conn->port);
 
   conn->state = DIR_CONN_STATE_CLIENT_SENDING; /* start flushing conn */

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.249
retrieving revision 1.250
diff -u -d -r1.249 -r1.250
--- dirserv.c	14 Oct 2005 04:56:20 -0000	1.249
+++ dirserv.c	17 Oct 2005 16:21:41 -0000	1.250
@@ -1039,7 +1039,8 @@
     return -1;
   }
   set_cached_dir(&the_directory, new_directory, time(NULL));
-  log_fn(LOG_INFO,"New directory (size %d):\n%s",(int)the_directory.dir_len,
+  log_fn(LOG_INFO,"New directory (size %d) has been built.",(int)the_directory.dir_len);
+  log_fn(LOG_DEBUG,"New directory (size %d):\n%s",(int)the_directory.dir_len,
          the_directory.dir);
 
   the_directory_is_dirty = 0;

Index: onion.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/onion.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -d -r1.185 -r1.186
--- onion.c	6 Oct 2005 04:33:40 -0000	1.185
+++ onion.c	17 Oct 2005 16:21:42 -0000	1.186
@@ -245,8 +245,10 @@
   }
 
   dh = crypto_dh_new();
-  if (crypto_dh_get_public(dh, handshake_reply_out, DH_KEY_LEN))
+  if (crypto_dh_get_public(dh, handshake_reply_out, DH_KEY_LEN)) {
+    log_fn(LOG_INFO, "crypto_dh_get_public failed.");
     goto err;
+  }
 
 #ifdef DEBUG_ONION_SKINS
   printf("Server: server g^y:");
@@ -259,8 +261,10 @@
   key_material = tor_malloc(DIGEST_LEN+key_out_len);
   len = crypto_dh_compute_secret(dh, challenge, DH_KEY_LEN,
                                  key_material, DIGEST_LEN+key_out_len);
-  if (len < 0)
+  if (len < 0) {
+    log_fn(LOG_INFO, "crypto_dh_compute_secret failed.");
     goto err;
+  }
 
   /* send back H(K|0) as proof that we learned K. */
   memcpy(handshake_reply_out+DH_KEY_LEN, key_material, DIGEST_LEN);

Index: router.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.221
retrieving revision 1.222
diff -u -d -r1.221 -r1.222
--- router.c	17 Oct 2005 03:17:29 -0000	1.221
+++ router.c	17 Oct 2005 16:21:42 -0000	1.222
@@ -629,7 +629,7 @@
     if (force ||
         !connection_get_by_identity_digest(router->identity_digest,
                                            CONN_TYPE_OR)) {
-      log_fn(LOG_INFO,"%sconnecting to %s at %s:%u.",
+      log_fn(LOG_DEBUG,"%sconnecting to %s at %s:%u.",
              clique_mode(options) ? "(forced) " : "",
              router->nickname, router->address, router->or_port);
       /* Remember when we started trying to determine reachability */



More information about the tor-commits mailing list