summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index f14bdde90b..47058352f0 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1810,9 +1810,10 @@ directory_send_command(dir_connection_t *conn,
tor_assert(payload);
httpcommand = "POST";
url = tor_strdup("/tor/");
- if (why) {
- smartlist_add_asprintf(headers, "X-Desc-Gen-Reason: %s\r\n", why);
+ if (!why) {
+ why = "for no reason at all";
}
+ smartlist_add_asprintf(headers, "X-Desc-Gen-Reason: %s\r\n", why);
break;
}
case DIR_PURPOSE_UPLOAD_VOTE: