summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-13 09:57:10 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-13 09:57:10 -0400
commit76e9de7c6d1a22d89053dd4fa8671d5696c52634 (patch)
treece47d720487e2aab988921da4cf78f1297d9354b /src/or/directory.c
parent8c8ed91aae24aa1188275dfb6fbd5f6fcbcbe1a8 (diff)
parent1c80eb92fa6c5240b1029c5ee1febe2d20b7d882 (diff)
downloadtor-76e9de7c6d1a22d89053dd4fa8671d5696c52634.tar.gz
tor-76e9de7c6d1a22d89053dd4fa8671d5696c52634.zip
Merge branch 'maint-0.3.3'
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 3e8d5ae9cf..c7da804909 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1815,9 +1815,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: