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

[or-cvs] some comments to point nick at the latest bugs



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

Modified Files:
	connection.c main.c 
Log Message:
some comments to point nick at the latest bugs


Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -d -r1.162 -r1.163
--- connection.c	28 Feb 2004 07:51:30 -0000	1.162
+++ connection.c	28 Feb 2004 11:48:22 -0000	1.163
@@ -414,6 +414,9 @@
        router_mark_as_down(conn->nickname);
     }
     /* There's a read error; kill the connection.*/
+    /* XXX This is the place. We need to somehow indicate to
+     * conn that it should never try to flush, or do anything
+     * with conn->s but close it. */
     connection_mark_for_close(conn, END_STREAM_REASON_MISC);
     return -1;
   }

Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -d -r1.177 -r1.178
--- main.c	28 Feb 2004 04:44:48 -0000	1.177
+++ main.c	28 Feb 2004 11:48:22 -0000	1.178
@@ -181,6 +181,7 @@
       if (!conn->marked_for_close) {
         /* this connection is broken. remove it */
         /* XXX This shouldn't ever happen anymore. */
+        /* XXX but it'll clearly happen on MS_WINDOWS from POLLERR, right? */
         log_fn(LOG_ERR,"Unhandled error on read for %s connection (fd %d); removing",
                conn_type_to_string[conn->type], conn->s);
         connection_mark_for_close(conn,0);
@@ -220,8 +221,10 @@
   assert_connection_ok(conn, time(NULL));
   if(conn->marked_for_close) {
     log_fn(LOG_INFO,"Cleaning up connection (fd %d).",conn->s);
-    if(conn->s >= 0) { /* might be an incomplete edge connection */
+    if(conn->s >= 0) { /* -1 means it's an incomplete edge connection */
       /* FIXME there's got to be a better way to check for this -- and make other checks? */
+/* XXX the below two calls to flush_buf should not happen if the
+ * conn got hung up on. */
       if(connection_speaks_cells(conn)) {
         if(conn->state == OR_CONN_STATE_OPEN)
           flush_buf_tls(conn->tls, conn->outbuf, &conn->outbuf_flushlen);