[or-cvs] Hey kids, guess why connection_mark_for_close() started giv...

Nick Mathewson nickm at seul.org
Fri Sep 30 04:43:44 UTC 2005


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv26675/src/or

Modified Files:
	or.h 
Log Message:
Hey kids, guess why connection_mark_for_close() started giving an assert when called for an even-numbered line? Right, because I made it a bitfield, when it was really a line number.  Why did I think it was a bitfield?  A stale comment.  Let that be a lesson to us all.

Index: or.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.697
retrieving revision 1.698
diff -u -d -r1.697 -r1.698
--- or.h	29 Sep 2005 22:59:17 -0000	1.697
+++ or.h	30 Sep 2005 04:43:42 -0000	1.698
@@ -597,9 +597,6 @@
   unsigned wants_to_write:1; /**< Boolean: should we start writing again once
                              * the bandwidth throttler allows reads?
                              */
-  unsigned marked_for_close:1; /**< Boolean: should we close this conn on the
-                               * next iteration of the main loop?
-                               */
   unsigned hold_open_until_flushed:1; /**< Despite this connection's being
                                       * marked for close, do we flush it
                                       * before closing it?
@@ -612,6 +609,10 @@
   int poll_index; /* XXXX rename. */
   struct event *read_event; /**< libevent event structure. */
   struct event *write_event; /**< libevent event structure. */
+  int marked_for_close; /**< Should we close this conn on the next iteration
+                         * of the main loop? (If true, holds the line number
+                         * where this connection was marked.)
+                         */
   const char *marked_for_close_file; /**< For debugging: in which file were
                                       * we marked for close? */
 
@@ -984,7 +985,8 @@
   uint32_t magic; /**< For memory debugging: must equal CIRCUIT_MAGIC. */
 
   int marked_for_close; /**< Should we close this circuit at the end of the
-                         * main loop? */
+                         * main loop? (If true, holds the line number where
+                         * this circuit was marked.) */
   const char *marked_for_close_file; /**< For debugging: in which file was this
                                       * circuit marked for close? */
 



More information about the tor-commits mailing list