[or-cvs] r10396: fix for bug 439: make _sure_ *msg is set when we leave dirse (in tor/trunk: . src/or)
nickm at seul.org
nickm at seul.org
Tue May 29 18:39:56 UTC 2007
Author: nickm
Date: 2007-05-29 14:39:56 -0400 (Tue, 29 May 2007)
New Revision: 10396
Modified:
tor/trunk/
tor/trunk/src/or/dirserv.c
Log:
r13057 at 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().
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r13057] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c 2007-05-29 18:21:00 UTC (rev 10395)
+++ tor/trunk/src/or/dirserv.c 2007-05-29 18:39:56 UTC (rev 10396)
@@ -554,6 +554,16 @@
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;
}
More information about the tor-commits
mailing list