diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-05-29 18:39:56 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-05-29 18:39:56 +0000 |
commit | c5b3a8db84f624b0155898f4a87388e544f60017 (patch) | |
tree | 97ca7fd033a5982bf7afc191e9fa8d765108b058 | |
parent | e5ed434c42cd379847bff63851bd623b252c25a3 (diff) | |
download | tor-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.c | 10 |
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; } |