diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-07-25 22:56:54 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-07-25 22:56:54 +0000 |
commit | a8821e2d826755209f793f7ce61e04e9f8bfed64 (patch) | |
tree | b5376c791d8ee9d194e2146955bb1b69a75881d4 /src/or/control.c | |
parent | 47f3a40900e24cf5d14e8fa218b876a2b39b25f0 (diff) | |
download | tor-a8821e2d826755209f793f7ce61e04e9f8bfed64.tar.gz tor-a8821e2d826755209f793f7ce61e04e9f8bfed64.zip |
r13905@catbus: nickm | 2007-07-25 18:48:44 -0400
ADDRMAP events should never have specified local time. Extend them to have the proper gmt time, and make GETINFO address-mappings always do the right thing (since it is new in this version).
svn:r10930
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c index fc4c002d05..d99fb4b8c6 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -3099,10 +3099,15 @@ control_event_address_mapped(const char *from, const char *to, time_t expires, error); else { char buf[ISO_TIME_LEN+1]; + char buf2[ISO_TIME_LEN+1]; format_local_iso_time(buf,expires); + format_iso_time(buf2,expires); send_control_event_extended(EVENT_ADDRMAP, ALL_NAMES, - "650 ADDRMAP %s %s \"%s\"@%s\r\n", - from, to, buf, error); + "650 ADDRMAP %s %s \"%s\"" + "@%s%sEXPIRES=\"%s\"\r\n", + from, to, buf, + error, error?" ":"", + buf2); } return 0; |