diff options
author | Roger Dingledine <arma@torproject.org> | 2009-02-20 10:25:08 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2009-02-20 10:25:08 +0000 |
commit | 1b6688786cf008e8ae03684136efa43e0f915e92 (patch) | |
tree | 006b4ab8d0215a465695489f734cce003a32183d /src | |
parent | cdbd371d9f2667a6b7bb5670ce865062032b80d2 (diff) | |
download | tor-1b6688786cf008e8ae03684136efa43e0f915e92.tar.gz tor-1b6688786cf008e8ae03684136efa43e0f915e92.zip |
send the newconsensus event if the controller has asked for newconsensus
events, not if he's asked for ns events
svn:r18656
Diffstat (limited to 'src')
-rw-r--r-- | src/or/control.c | 2 | ||||
-rw-r--r-- | src/or/networkstatus.c | 6 |
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); |