aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-27 00:20:08 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-27 00:20:08 +0000
commit0c5e03fa21ecdc5f484b8cef18fcbb611349b47f (patch)
treeb520cd4b3ea3e70f2297187ceb9626db8d2632b2
parenta87335472cc3f940854668aa66c7db30d159196a (diff)
downloadtor-0c5e03fa21ecdc5f484b8cef18fcbb611349b47f.tar
tor-0c5e03fa21ecdc5f484b8cef18fcbb611349b47f.tar.gz
Remove a deprecated controller alias; make another one generate a warning.
svn:r17793
-rw-r--r--src/or/control.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 317bb1117..3c6c4fdb0 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -967,7 +967,7 @@ handle_control_setevents(control_connection_t *conn, uint32_t len,
smartlist_split_string(events, body, " ",
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
- SMARTLIST_FOREACH(events, const char *, ev,
+ SMARTLIST_FOREACH_BEGIN(events, const char *, ev)
{
if (!strcasecmp(ev, "EXTENDED")) {
extended = 1;
@@ -1008,14 +1008,7 @@ 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, "GUARDS")) {
- /* XXXX021 This check is here to tolerate the controllers that
- * depended on the buggy spec in 0.1.2.5-alpha through 0.1.2.10-rc.
- * Once those versions are obsolete, stop supporting this. */
- log_warn(LD_CONTROL, "Controller used obsolete 'GUARDS' event name; "
- "use GUARD instead.");
- event_code = EVENT_GUARD;
- } else if (!strcasecmp(ev, "STREAM_BW"))
+ else if (!strcasecmp(ev, "STREAM_BW"))
event_code = EVENT_STREAM_BANDWIDTH_USED;
else {
connection_printf_to_buf(conn, "552 Unrecognized event \"%s\"\r\n",
@@ -1025,7 +1018,8 @@ handle_control_setevents(control_connection_t *conn, uint32_t len,
return 0;
}
event_mask |= (1 << event_code);
- });
+ }
+ SMARTLIST_FOREACH_END(ev);
SMARTLIST_FOREACH(events, char *, e, tor_free(e));
smartlist_free(events);
@@ -1774,10 +1768,15 @@ getinfo_helper_events(control_connection_t *control_conn,
smartlist_free(status);
} else if (!strcmpstart(question, "addr-mappings/") ||
!strcmpstart(question, "address-mappings/")) {
- /* XXXX021 Warn about deprecated addr-mappings variant. */
time_t min_e, max_e;
smartlist_t *mappings;
int want_expiry = !strcmpstart(question, "address-mappings/");
+ if (!strcmpstart(question, "addr-mappings/")) {
+ /* XXXX022 This has been deprecated since 0.2.0.3-alpha, and has
+ generated a warning since 0.2.1.10-alpha; remove late in 0.2.2.x. */
+ log_warn(LD_CONTROL, "Controller used obsolete addr-mappings/ GETINFO "
+ "key; use address-mappings/ instead.");
+ }
question += strlen(want_expiry ? "address-mappings/"
: "addr-mappings/");
if (!strcmp(question, "all")) {