diff options
author | Roger Dingledine <arma@torproject.org> | 2007-03-14 23:50:41 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-03-14 23:50:41 +0000 |
commit | 5740071674f88e152ce9dd65530881874d36e037 (patch) | |
tree | 29cfabfaced9a3bb8372db728ab3d347d045e28c | |
parent | 17c055ce6e36734b813614cf038bdfbc5e91808a (diff) | |
download | tor-5740071674f88e152ce9dd65530881874d36e037.tar tor-5740071674f88e152ce9dd65530881874d36e037.tar.gz |
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.
svn:r9817
-rw-r--r-- | doc/spec/control-spec.txt | 4 | ||||
-rw-r--r-- | src/or/control.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/doc/spec/control-spec.txt b/doc/spec/control-spec.txt index ffa682df3..3bf36b4d2 100644 --- a/doc/spec/control-spec.txt +++ b/doc/spec/control-spec.txt @@ -194,7 +194,7 @@ $Id$ 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 @@ $Id$ 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" diff --git a/src/or/control.c b/src/or/control.c index a2dcca299..0c245723e 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -882,7 +882,10 @@ handle_control_setevents(control_connection_t *conn, uint32_t len, 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", |