summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-22 04:53:11 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-22 04:53:11 +0000
commit98a376fab1725c81df84a1782b3b625958e4c6ba (patch)
tree4961240d483831348828a71151f67e75594c8836 /src/or/dirserv.c
parentdf22dcb602ff45f32444ba1f882d092996345771 (diff)
downloadtor-98a376fab1725c81df84a1782b3b625958e4c6ba.tar.gz
tor-98a376fab1725c81df84a1782b3b625958e4c6ba.zip
More propagating of things that need to be was_router_added_t now.
svn:r17721
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index c33e7ab444..de7401d4a8 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -584,8 +584,7 @@ dirserv_add_multiple_descriptors(const char *desc, uint8_t purpose,
const char *source,
const char **msg)
{
- int r=ROUTER_ADDED_NOTIFY_GENERATOR; /* highest possible return value. */
- int r_tmp;
+ was_router_added_t r, r_tmp;
const char *msg_out;
smartlist_t *list;
const char *s;
@@ -596,6 +595,8 @@ dirserv_add_multiple_descriptors(const char *desc, uint8_t purpose,
int general = purpose == ROUTER_PURPOSE_GENERAL;
tor_assert(msg);
+ r=ROUTER_ADDED_NOTIFY_GENERATOR; /*Least severe return value. */
+
format_iso_time(time_buf, now);
if (tor_snprintf(annotation_buf, sizeof(annotation_buf),
"@uploaded-at %s\n"
@@ -644,8 +645,8 @@ dirserv_add_multiple_descriptors(const char *desc, uint8_t purpose,
if (! *msg) {
if (!n_parsed) {
*msg = "No descriptors found in your POST.";
- if (r > -1)
- r = -1;
+ if (WRA_WAS_ADDED(r))
+ r = ROUTER_WAS_NOT_NEW;
} else {
*msg = "(no message)";
}