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
commit1c80eb92fa6c5240b1029c5ee1febe2d20b7d882 (patch)
tree308dd10ec350e5a35b6b2c36b075979c1d6f119e /src/or/directory.c
parentbbbb5f39bed9412b7b27b903fc1939b7774fb1b0 (diff)
parentff70cc84f8b00e710171bc988ababc9fe1be88e9 (diff)
downloadtor-1c80eb92fa6c5240b1029c5ee1febe2d20b7d882.tar.gz
tor-1c80eb92fa6c5240b1029c5ee1febe2d20b7d882.zip
Merge branch 'maint-0.3.2' into 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 29d091af38..0004878cdb 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1811,9 +1811,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: