[or-cvs] Comment a confusing conditional

Nick Mathewson nickm at seul.org
Sat Nov 13 02:54:33 UTC 2004


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

Modified Files:
	main.c 
Log Message:
Comment a confusing conditional

Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.368
retrieving revision 1.369
diff -u -d -r1.368 -r1.369
--- main.c	12 Nov 2004 16:39:02 -0000	1.368
+++ main.c	13 Nov 2004 02:54:30 -0000	1.369
@@ -228,6 +228,16 @@
   /* see http://www.greenend.org.uk/rjk/2001/06/poll.html for
    * discussion of POLLIN vs POLLHUP */
   if(!(poll_array[i].revents & (POLLIN|POLLHUP|POLLERR)))
+    /* Sometimes read events get triggered for things that didn't ask
+     * for them (XXX due to unknown poll wonkiness) and sometime we
+     * want to read even though there was no read event (due to
+     * pending TLS data).
+     */
+
+    /* XXX Post 0.0.9, we should rewrite this whole if statement;
+     * something sane may result.  Nick suspects that the || below
+     * should be a &&.
+     */
     if(!connection_is_reading(conn) ||
        !connection_has_pending_tls_data(conn))
       return; /* this conn should not read */



More information about the tor-commits mailing list