[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r18656: {tor} send the newconsensus event if the controller has asked for (tor/trunk/src/or)
Author: arma
Date: 2009-02-20 05:25:08 -0500 (Fri, 20 Feb 2009)
New Revision: 18656
Modified:
tor/trunk/src/or/control.c
tor/trunk/src/or/networkstatus.c
Log:
send the newconsensus event if the controller has asked for newconsensus
events, not if he's asked for ns events
Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c 2009-02-20 10:22:31 UTC (rev 18655)
+++ tor/trunk/src/or/control.c 2009-02-20 10:25:08 UTC (rev 18656)
@@ -3568,6 +3568,8 @@
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");
}
Modified: tor/trunk/src/or/networkstatus.c
===================================================================
--- tor/trunk/src/or/networkstatus.c 2009-02-20 10:22:31 UTC (rev 18655)
+++ tor/trunk/src/or/networkstatus.c 2009-02-20 10:25:08 UTC (rev 18656)
@@ -1322,6 +1322,9 @@
* 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 @@
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);