From c5b3a8db84f624b0155898f4a87388e544f60017 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 29 May 2007 18:39:56 +0000 Subject: 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 --- src/or/dirserv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; } -- cgit v1.2.3-54-g00ecf