[or-cvs] r9817: the spec called it a GUARDS event, but the code called it a (in tor/trunk: doc/spec src/or)
arma at seul.org
arma at seul.org
Wed Mar 14 23:50:42 UTC 2007
Author: arma
Date: 2007-03-14 19:50:41 -0400 (Wed, 14 Mar 2007)
New Revision: 9817
Modified:
tor/trunk/doc/spec/control-spec.txt
tor/trunk/src/or/control.c
Log:
the spec called it a GUARDS event, but the code called
it a GUARD event. standardize on GUARD, but support people
asking for GUARDS too. reported by daejees.
backport candidate.
Modified: tor/trunk/doc/spec/control-spec.txt
===================================================================
--- tor/trunk/doc/spec/control-spec.txt 2007-03-14 23:06:19 UTC (rev 9816)
+++ tor/trunk/doc/spec/control-spec.txt 2007-03-14 23:50:41 UTC (rev 9817)
@@ -194,7 +194,7 @@
EventCode = "CIRC" / "STREAM" / "ORCONN" / "BW" / "DEBUG" /
"INFO" / "NOTICE" / "WARN" / "ERR" / "NEWDESC" / "ADDRMAP" /
"AUTHDIR_NEWDESCS" / "DESCCHANGED" / "STATUS_GENERAL" /
- "STATUS_CLIENT" / "STATUS_SERVER" / "GUARDS" / "NS" / "STREAM_BW"
+ "STATUS_CLIENT" / "STATUS_SERVER" / "GUARD" / "NS" / "STREAM_BW"
Any events *not* listed in the SETEVENTS line are turned off; thus, sending
SETEVENTS with an empty body turns off all event reporting.
@@ -1263,7 +1263,7 @@
4.1.11. Our set of guard nodes has changed
Syntax:
- "650" SP "GUARDS" SP Type SP Name SP Status ... CRLF
+ "650" SP "GUARD" SP Type SP Name SP Status ... CRLF
Type = "ENTRY"
Name = The (possibly verbose) nickname of the guard affected.
Status = "NEW" | "UP" | "DOWN" | "BAD" | "GOOD" | "DROPPED"
Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c 2007-03-14 23:06:19 UTC (rev 9816)
+++ tor/trunk/src/or/control.c 2007-03-14 23:50:41 UTC (rev 9817)
@@ -882,7 +882,10 @@
event_code = EVENT_STATUS_SERVER;
else if (!strcasecmp(ev, "GUARD"))
event_code = EVENT_GUARD;
- else if (!strcasecmp(ev, "STREAM_BW"))
+ else if (!strcasecmp(ev, "GUARDS")) {
+ /* XXX tolerate buggy spec in 0.1.2.5-alpha through 0.1.2.10-rc */
+ event_code = EVENT_GUARD;
+ } else if (!strcasecmp(ev, "STREAM_BW"))
event_code = EVENT_STREAM_BANDWIDTH_USED;
else {
connection_printf_to_buf(conn, "552 Unrecognized event \"%s\"\r\n",
More information about the tor-commits
mailing list