aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-08-07 19:20:55 +0000
committerRoger Dingledine <arma@torproject.org>2005-08-07 19:20:55 +0000
commit5c4da9dec68a90b8c497805be8af432818447378 (patch)
treece56f9921d7a78a42c8024025a1885414eb1b07d
parentbfe65db284eab9e2bc4d435034e0932fef48b27a (diff)
downloadtor-5c4da9dec68a90b8c497805be8af432818447378.tar
tor-5c4da9dec68a90b8c497805be8af432818447378.tar.gz
incomplete patch for matt's info controller signal term bug
svn:r4728
-rw-r--r--src/or/connection.c4
-rw-r--r--src/or/control.c7
-rw-r--r--src/or/or.h1
3 files changed, 8 insertions, 4 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 855fc9e39..f68fd3362 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -253,6 +253,10 @@ connection_free(connection_t *conn)
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);
}
diff --git a/src/or/control.c b/src/or/control.c
index b9032742b..ba65c4ebe 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -127,7 +127,6 @@ static char authentication_cookie[AUTHENTICATION_COOKIE_LEN];
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 @@ log_severity_to_event(int severity)
/** 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 @@ handle_control_setevents(connection_t *conn, uint32_t len, const char *body)
}
conn->event_mask = event_mask;
- update_global_event_mask();
+ control_update_global_event_mask();
send_control_done(conn);
return 0;
}
diff --git a/src/or/or.h b/src/or/or.h
index da6d26101..30f0e0a40 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1536,6 +1536,7 @@ typedef enum or_conn_status_event_t {
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);