summaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-08-20 09:00:41 -0400
committerNick Mathewson <nickm@torproject.org>2014-08-20 09:00:41 -0400
commit764cebb4d9a3f7b16d4735b9ef8a656bc921e217 (patch)
tree0bab1f00db2f0cb433f0524bea797d5779799c0d /src/or/relay.c
parent2937de21803174e14873f68b34ba8a6c62285c45 (diff)
parent1196ed7cc4fc202e43ca102a73befe62aa65767d (diff)
downloadtor-764cebb4d9a3f7b16d4735b9ef8a656bc921e217.tar.gz
tor-764cebb4d9a3f7b16d4735b9ef8a656bc921e217.zip
Merge remote-tracking branch 'public/bug12700_024'
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c8
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;
}
}