diff options
author | Roger Dingledine <arma@torproject.org> | 2007-08-19 04:58:55 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-08-19 04:58:55 +0000 |
commit | c88803d924abab3c8ea62597e506a0a896e5bc1d (patch) | |
tree | 05f058bbfa9d7ceeec5a6007628b0378905cb8a7 /src/or/control.c | |
parent | 86734616c73f75a540e4adccb898c8f636e7f270 (diff) | |
download | tor-c88803d924abab3c8ea62597e506a0a896e5bc1d.tar.gz tor-c88803d924abab3c8ea62597e506a0a896e5bc1d.zip |
Fix a bug in ADDRMAP controller replies that would sometimes
try to print a NULL. Patch from tup.
svn:r11181
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/control.c b/src/or/control.c index 67b56f40db..7847c67cbd 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -3174,7 +3174,7 @@ control_event_descriptors_changed(smartlist_t *routers) /** Called whenever an address mapping on <b>from<b> from changes to <b>to</b>. * <b>expires</b> values less than 3 are special; see connection_edge.c. If - * <b>error</b> is nonempty, it is an error code describing the failure + * <b>error</b> is non-NULL, it is an error code describing the failure * mode of the mapping. */ int @@ -3187,7 +3187,7 @@ control_event_address_mapped(const char *from, const char *to, time_t expires, if (expires < 3 || expires == TIME_MAX) send_control_event_extended(EVENT_ADDRMAP, ALL_NAMES, "650 ADDRMAP %s %s NEVER@%s\r\n", from, to, - error); + error?error:""); else { char buf[ISO_TIME_LEN+1]; char buf2[ISO_TIME_LEN+1]; @@ -3197,7 +3197,7 @@ control_event_address_mapped(const char *from, const char *to, time_t expires, "650 ADDRMAP %s %s \"%s\"" "@%s%sEXPIRES=\"%s\"\r\n", from, to, buf, - error, error?" ":"", + error?error:"", error?" ":"", buf2); } |