瀏覽代碼

Print address too when we say we cannot bind/listen

svn:r5213
Peter Palfrader 20 年之前
父節點
當前提交
14934dece2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/or/connection.c

+ 2 - 2
src/or/connection.c

@@ -522,13 +522,13 @@ connection_create_listener(const char *bindaddress, uint16_t bindport,
 #endif
 
   if (bind(s,(struct sockaddr *)&bindaddr,sizeof(bindaddr)) < 0) {
-    log_fn(LOG_WARN, "Could not bind to port %u: %s", usePort,
+    log_fn(LOG_WARN, "Could not bind to %s:%u: %s", address, usePort,
            tor_socket_strerror(tor_socket_errno(s)));
     goto err;
   }
 
   if (listen(s,SOMAXCONN) < 0) {
-    log_fn(LOG_WARN, "Could not listen on port %u: %s", usePort,
+    log_fn(LOG_WARN, "Could not listen on %s%u: %s", address, usePort,
            tor_socket_strerror(tor_socket_errno(s)));
     goto err;
   }