summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-05-11 08:58:11 -0400
committerDavid Goulet <dgoulet@torproject.org>2018-05-11 08:58:11 -0400
commit51f65c185ed88576ab15b66babcbdf3a6553ef71 (patch)
tree27cd544e2d1cef1cd5a5fb9f3cb448ee025682ef
parent9800f4769f2dd7a58c061661c224c0f860ff76ca (diff)
downloadtor-51f65c185ed88576ab15b66babcbdf3a6553ef71.tar.gz
tor-51f65c185ed88576ab15b66babcbdf3a6553ef71.zip
control: Mask the event(s) before using ANY_EVENT_IS_INTERESTING()
Before this commit, the control events were never triggered. It was introduced with commit 0c19ce7bdece5906e035e71d3fb682632c8bb9cb. Fixes #26082 Signed-off-by: David Goulet <dgoulet@torproject.org>
-rw-r--r--src/or/control.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 237a8572d4..6f87f5ab5f 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -115,7 +115,7 @@ static int disable_log_messages = 0;
/** Macro: true if any event from the bitfield 'e' is interesting. */
#define ANY_EVENT_IS_INTERESTING(e) \
- EVENT_IS_INTERESTING(e)
+ (!! (global_event_mask & (e)))
/** If we're using cookie-type authentication, how long should our cookies be?
*/
@@ -375,11 +375,11 @@ int
control_any_per_second_event_enabled(void)
{
return ANY_EVENT_IS_INTERESTING(
- EVENT_BANDWIDTH_USED |
- EVENT_CELL_STATS |
- EVENT_CIRC_BANDWIDTH_USED |
- EVENT_CONN_BW |
- EVENT_STREAM_BANDWIDTH_USED
+ EVENT_MASK_(EVENT_BANDWIDTH_USED) |
+ EVENT_MASK_(EVENT_CELL_STATS) |
+ EVENT_MASK_(EVENT_CIRC_BANDWIDTH_USED) |
+ EVENT_MASK_(EVENT_CONN_BW) |
+ EVENT_MASK_(EVENT_STREAM_BANDWIDTH_USED)
);
}