[or-cvs] incomplete patch for matt"s info controller signal term bug

arma at seul.org arma at seul.org
Sun Aug 7 19:20:57 UTC 2005


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

Modified Files:
	connection.c control.c or.h 
Log Message:
incomplete patch for matt's info controller signal term bug


Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.391
retrieving revision 1.392
diff -u -d -r1.391 -r1.392
--- connection.c	4 Aug 2005 18:29:01 -0000	1.391
+++ connection.c	7 Aug 2005 19:20:55 -0000	1.392
@@ -253,6 +253,10 @@
     if (conn->state == OR_CONN_STATE_OPEN)
       directory_set_dirty();
   }
+  if (conn->type == CONN_TYPE_CONTROL) {
+    conn->event_mask = 0;
+    control_update_global_event_mask();
+  }
   connection_unregister(conn);
   _connection_free(conn);
 }

Index: control.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/control.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -d -r1.112 -r1.113
--- control.c	4 Aug 2005 19:56:41 -0000	1.112
+++ control.c	7 Aug 2005 19:20:55 -0000	1.113
@@ -127,7 +127,6 @@
 
 static void connection_printf_to_buf(connection_t *conn, const char *format, ...)
   CHECK_PRINTF(2,3);
-static void update_global_event_mask(void);
 static void send_control0_message(connection_t *conn, uint16_t type,
                                  uint32_t len, const char *body);
 static void send_control_done(connection_t *conn);
@@ -204,8 +203,8 @@
 
 /** Set <b>global_event_mask</b> to the bitwise OR of each live control
  * connection's event_mask field. */
-static void
-update_global_event_mask(void)
+void
+control_update_global_event_mask(void)
 {
   connection_t **conns;
   int n_conns, i;
@@ -847,7 +846,7 @@
   }
   conn->event_mask = event_mask;
 
-  update_global_event_mask();
+  control_update_global_event_mask();
   send_control_done(conn);
   return 0;
 }

Index: or.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.634
retrieving revision 1.635
diff -u -d -r1.634 -r1.635
--- or.h	4 Aug 2005 19:56:41 -0000	1.634
+++ or.h	7 Aug 2005 19:20:55 -0000	1.635
@@ -1536,6 +1536,7 @@
   OR_CONN_EVENT_CLOSED       = 3,
 } or_conn_status_event_t;
 
+void control_update_global_event_mask(void);
 void control_adjust_event_log_severity(void);
 void disable_control_logging(void);
 void enable_control_logging(void);



More information about the tor-commits mailing list