[or-cvs] Note router addr:port in log messages

Nick Mathewson nickm at seul.org
Sat Apr 24 22:40:34 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv32443/src/or

Modified Files:
	connection_or.c 
Log Message:
Note router addr:port in log messages

Index: connection_or.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_or.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- connection_or.c	24 Apr 2004 22:34:31 -0000	1.96
+++ connection_or.c	24 Apr 2004 22:40:32 -0000	1.97
@@ -200,10 +200,12 @@
            conn->address, conn->port);
     return -1;
   }
-  log_fn(LOG_DEBUG, "Other side claims to be '%s'", nickname);
+  log_fn(LOG_DEBUG, "Other side (%s:%d) claims to be '%s'", conn->address,
+         conn->port, nickname);
   router = router_get_by_nickname(nickname);
   if (!router) {
-    log_fn(LOG_INFO, "Unrecognized router with nickname '%s'", nickname);
+    log_fn(LOG_INFO, "Unrecognized router with nickname '%s' at %s:%d",
+           nickname, conn->address, conn->port);
     return -1;
   }
   if(tor_tls_verify(conn->tls, router->identity_pkey)<0) {
@@ -217,8 +219,8 @@
     /* I initiated this connection. */
     if (strcasecmp(conn->nickname, nickname)) {
       log_fn(options.DirPort ? LOG_WARN : LOG_INFO,
-             "Other side is '%s', but we tried to connect to '%s'",
-             nickname, conn->nickname);
+             "Other side (%s:%d) is '%s', but we tried to connect to '%s'",
+             conn->address, conn->port, nickname, conn->nickname);
       return -1;
     }
   } else {



More information about the tor-commits mailing list