diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/connection_edge.c | 2 | ||||
-rw-r--r-- | src/or/control.c | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 95f2536ef1..f310d9289b 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1161,7 +1161,7 @@ addressmap_get_mappings(smartlist_t *sl, time_t min_expires, tor_snprintf(line, len, "%s %s NEVER", key, val->new_address); else { char time[ISO_TIME_LEN+1]; - format_local_iso_time(time, val->expires); + format_iso_time(time, val->expires); tor_snprintf(line, len, "%s %s \"%s\"", key, val->new_address, time); } 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; |