aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/control.c2
-rw-r--r--src/or/networkstatus.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 6a556ec30d..5600bdcfd9 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -3568,6 +3568,8 @@ control_event_networkstatus_changed(smartlist_t *statuses)
int
control_event_newconsensus(const networkstatus_t *consensus)
{
+ if (!control_event_is_interesting(EVENT_NEWCONSENSUS))
+ return 0;
return control_event_networkstatus_changed_helper(
consensus->routerstatus_list, EVENT_NEWCONSENSUS, "NEWCONSENSUS");
}
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index f9af470678..8e340a4a57 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -1322,6 +1322,9 @@ notify_control_networkstatus_changed(const networkstatus_t *old_c,
* as what they're listed as */
control_event_newconsensus(new_c);
+ if (!control_event_is_interesting(EVENT_NS))
+ return;
+
if (!old_c) {
control_event_networkstatus_changed(new_c->routerstatus_list);
return;
@@ -1486,8 +1489,7 @@ networkstatus_set_current_consensus(const char *consensus, unsigned flags)
if (r != 1 && dl_certs)
authority_certs_fetch_missing(c, now);
- if (control_event_is_interesting(EVENT_NS))
- notify_control_networkstatus_changed(current_consensus, c);
+ notify_control_networkstatus_changed(current_consensus, c);
if (current_consensus) {
networkstatus_copy_old_consensus_info(c, current_consensus);