summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-05-29 18:39:56 +0000
committerNick Mathewson <nickm@torproject.org>2007-05-29 18:39:56 +0000
commitc5b3a8db84f624b0155898f4a87388e544f60017 (patch)
tree97ca7fd033a5982bf7afc191e9fa8d765108b058
parente5ed434c42cd379847bff63851bd623b252c25a3 (diff)
downloadtor-c5b3a8db84f624b0155898f4a87388e544f60017.tar.gz
tor-c5b3a8db84f624b0155898f4a87388e544f60017.zip
r13057@catbus: nickm | 2007-05-29 14:39:27 -0400
fix for bug 439: make _sure_ *msg is set when we leave dirserv_add_multiple_descriptors(). svn:r10396
-rw-r--r--src/or/dirserv.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 28fefe435d..00c527ba83 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -554,6 +554,16 @@ dirserv_add_multiple_descriptors(const char *desc, const char **msg)
n_parsed += smartlist_len(list);
smartlist_free(list);
+ if (! *msg) {
+ if (!n_parsed) {
+ *msg = "No descriptors found in your POST.";
+ if (r > -1)
+ r = -1;
+ } else {
+ *msg = "(no message)";
+ }
+ }
+
return r <= 2 ? r : 2;
}