[or-cvs] Resolve FIXMES: sometimes an error code is just an error code

Nick Mathewson nickm at seul.org
Fri Nov 12 05:03:54 UTC 2004


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

Modified Files:
	connection.c 
Log Message:
Resolve FIXMES: sometimes an error code is just an error code

Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.285
retrieving revision 1.286
diff -u -d -r1.285 -r1.286
--- connection.c	9 Nov 2004 20:04:00 -0000	1.285
+++ connection.c	12 Nov 2004 05:03:50 -0000	1.286
@@ -949,10 +949,7 @@
     }
     if(e) {
       /* some sort of error, but maybe just inprogress still */
-      errno = e; /* XXX008 this is a kludge. maybe we should rearrange
-                    our error-hunting functions? E.g. pass errno to
-                    tor_socket_errno(). */
-      if(!ERRNO_IS_CONN_EINPROGRESS(tor_socket_errno(conn->s))) {
+      if(!ERRNO_IS_CONN_EINPROGRESS(e)) {
         log_fn(LOG_INFO,"in-progress connect failed. Removing.");
         connection_close_immediate(conn);
         connection_mark_for_close(conn);
@@ -1445,7 +1442,6 @@
     case CONN_TYPE_CONTROL:
       tor_assert(conn->state >= _CONTROL_CONN_STATE_MIN);
       tor_assert(conn->state <= _CONTROL_CONN_STATE_MAX);
-      /* XXXX009 NM */
       break;
     default:
       tor_assert(0);



More information about the tor-commits mailing list