diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-09-09 10:51:39 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-09 10:51:39 -0400 |
commit | dd22ab519ab9ac7affa3bd775b6021049ebe7dd9 (patch) | |
tree | 41dec4e0a8c924a08021974130e9ed9ebc633b3d /src | |
parent | 8391c96091e8e86c43954302df0b188ec1e5490d (diff) | |
parent | 1196ed7cc4fc202e43ca102a73befe62aa65767d (diff) | |
download | tor-dd22ab519ab9ac7affa3bd775b6021049ebe7dd9.tar.gz tor-dd22ab519ab9ac7affa3bd775b6021049ebe7dd9.zip |
Merge remote-tracking branch 'public/bug12700_024' into maint-0.2.5
Diffstat (limited to 'src')
-rw-r--r-- | src/or/relay.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index f42602d412..4d71157db8 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -523,6 +523,7 @@ relay_header_unpack(relay_header_t *dest, const uint8_t *src) static const char * relay_command_to_string(uint8_t command) { + static char buf[64]; switch (command) { case RELAY_COMMAND_BEGIN: return "BEGIN"; case RELAY_COMMAND_DATA: return "DATA"; @@ -547,7 +548,12 @@ relay_command_to_string(uint8_t command) case RELAY_COMMAND_RENDEZVOUS_ESTABLISHED: return "RENDEZVOUS_ESTABLISHED"; case RELAY_COMMAND_INTRODUCE_ACK: return "INTRODUCE_ACK"; - default: return "(unrecognized)"; + case RELAY_COMMAND_EXTEND2: return "EXTEND2"; + case RELAY_COMMAND_EXTENDED2: return "EXTENDED2"; + default: + tor_snprintf(buf, sizeof(buf), "Unrecognized relay command %u", + (unsigned)command); + return buf; } } |