aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-05-15 10:04:49 -0400
committerNick Mathewson <nickm@torproject.org>2012-05-15 10:04:49 -0400
commit5905a0b2dbcff8bd07e179750f53a8f010b4a5e0 (patch)
tree4fe92f0a9b5e55b43878a371052785ef3fac675f /src/or
parent0be946c6936265616e92d8c1b3350ece2501c0dc (diff)
parentf2a6eedded9d4dc3c854c1e3091d1f6278ac6e7f (diff)
downloadtor-5905a0b2dbcff8bd07e179750f53a8f010b4a5e0.tar
tor-5905a0b2dbcff8bd07e179750f53a8f010b4a5e0.tar.gz
Merge branch 'bug5796_022_squashed' into maint-0.2.2
Diffstat (limited to 'src/or')
-rw-r--r--src/or/control.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c
index c1a19ca21..d6e693285 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2389,6 +2389,10 @@ handle_control_setcircuitpurpose(control_connection_t *conn,
{
const char *purp = find_element_starting_with(args,1,"PURPOSE=");
+ if (!purp) {
+ connection_write_str_to_buf("552 No purpose given\r\n", conn);
+ goto done;
+ }
new_purpose = circuit_purpose_from_string(purp);
if (new_purpose == CIRCUIT_PURPOSE_UNKNOWN) {
connection_printf_to_buf(conn, "552 Unknown purpose \"%s\"\r\n", purp);