[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] bugfix: we were writing to stderr even when it"s closed



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	connection.c 
Log Message:
bugfix: we were writing to stderr even when it's closed


Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- connection.c	30 Nov 2003 09:35:26 -0000	1.134
+++ connection.c	30 Nov 2003 09:51:35 -0000	1.135
@@ -272,8 +272,7 @@
   if(connect(s,(struct sockaddr *)&dest_addr,sizeof(dest_addr)) < 0) {
     if(!ERRNO_CONN_EINPROGRESS(errno)) {
       /* yuck. kill it. */
-      perror("connect");
-      log_fn(LOG_INFO,"Connect() to %s:%u failed.",address,port);
+      log_fn(LOG_INFO,"Connect() to %s:%u failed: %s",address,port,strerror(errno));
       close(s);
       return -1;
     } else {