diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-04-05 16:57:53 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-04-05 16:57:53 -0400 |
commit | 3367a7611eb2a4fbedca568e39045971106cb315 (patch) | |
tree | a905bc066a7d13e0d38d8e49227de03606764fbb /src/or/control.c | |
parent | d1dc23c9386c6c85ec50c5b4d0a9077ffcb78683 (diff) | |
parent | 74f5e304e49b8ccde2b97232c49e5025dba21f59 (diff) | |
download | tor-3367a7611eb2a4fbedca568e39045971106cb315.tar.gz tor-3367a7611eb2a4fbedca568e39045971106cb315.zip |
Merge remote-tracking branch 'desoxy/bug-8596' into maint-0.2.4
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/or/control.c b/src/or/control.c index 2a68464189..f50b87711c 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -2947,7 +2947,7 @@ handle_control_resolve(control_connection_t *conn, uint32_t len, send_control_done(conn); SMARTLIST_FOREACH(failed, const char *, arg, { control_event_address_mapped(arg, arg, time(NULL), - "internal"); + "internal", 0); }); SMARTLIST_FOREACH(args, char *, cp, tor_free(cp)); @@ -4024,15 +4024,17 @@ control_event_descriptors_changed(smartlist_t *routers) */ int control_event_address_mapped(const char *from, const char *to, time_t expires, - const char *error) + const char *error, const int cached) { if (!EVENT_IS_INTERESTING(EVENT_ADDRMAP)) return 0; if (expires < 3 || expires == TIME_MAX) send_control_event(EVENT_ADDRMAP, ALL_FORMATS, - "650 ADDRMAP %s %s NEVER %s\r\n", from, to, - error?error:""); + "650 ADDRMAP %s %s NEVER %s%s" + "CACHED=\"%s\"\r\n", + from, to, error?error:"", error?" ":"", + cached?"YES":"NO"); else { char buf[ISO_TIME_LEN+1]; char buf2[ISO_TIME_LEN+1]; @@ -4040,10 +4042,10 @@ control_event_address_mapped(const char *from, const char *to, time_t expires, format_iso_time(buf2,expires); send_control_event(EVENT_ADDRMAP, ALL_FORMATS, "650 ADDRMAP %s %s \"%s\"" - " %s%sEXPIRES=\"%s\"\r\n", + " %s%sEXPIRES=\"%s\" CACHED=\"%s\"\r\n", from, to, buf, error?error:"", error?" ":"", - buf2); + buf2, cached?"YES":"NO"); } return 0; |