From 959b5585a5a520e118d5337ab8e643efbd4fc686 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 15 Oct 2003 18:28:32 +0000 Subject: Stop using stdout for non-debugging cases svn:r592 --- src/or/connection.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/or/connection.c') diff --git a/src/or/connection.c b/src/or/connection.c index 7a0d0b8b6..852199c39 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -138,13 +138,14 @@ int connection_create_listener(struct sockaddr_in *bindaddr, int type) { setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (void*)&one, sizeof(one)); if(bind(s,(struct sockaddr *)bindaddr,sizeof(*bindaddr)) < 0) { - perror("bind "); - log(LOG_WARN,"Could not bind to port %u.",ntohs(bindaddr->sin_port)); + log(LOG_WARN,"Could not bind to port %u: %s",ntohs(bindaddr->sin_port), + strerror(errno)); return -1; } if(listen(s,SOMAXCONN) < 0) { - log(LOG_WARN,"Could not listen on port %u.",ntohs(bindaddr->sin_port)); + log(LOG_WARN,"Could not listen on port %u: %s",ntohs(bindaddr->sin_port), + strerror(errno)); return -1; } -- cgit v1.2.3