diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/dirserv.c | 10 | ||||
-rw-r--r-- | src/or/or.h | 4 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 399e63cc84..598316fcda 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -568,13 +568,7 @@ authdir_wants_to_reject_router(routerinfo_t *ri, const char **msg, static int WRA_MORE_SEVERE(was_router_added_t a, was_router_added_t b) { - if (b == ROUTER_ADDED_SUCCESSFULLY) { - return 1; - } else if (b == ROUTER_ADDED_NOTIFY_GENERATOR) { - return !WRA_WAS_ADDED(a); - } else { - return a < b; - } + return a < b; } /** As for dirserv_add_descriptor(), but accepts multiple documents, and @@ -595,7 +589,7 @@ 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. */ + r=ROUTER_ADDED_SUCCESSFULLY; /*Least severe return value. */ format_iso_time(time_buf, now); if (tor_snprintf(annotation_buf, sizeof(annotation_buf), diff --git a/src/or/or.h b/src/or/or.h index 06d1b89355..ffb9894438 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -4373,8 +4373,8 @@ void router_set_status(const char *digest, int up); /** Return value for router_add_to_routerlist() and dirserv_add_descriptor() */ typedef enum was_router_added_t { - ROUTER_ADDED_SUCCESSFULLY = 0, - ROUTER_ADDED_NOTIFY_GENERATOR = 1, + ROUTER_ADDED_SUCCESSFULLY = 1, + ROUTER_ADDED_NOTIFY_GENERATOR = 0, ROUTER_BAD_EI = -1, ROUTER_WAS_NOT_NEW = -2, ROUTER_NOT_IN_CONSENSUS = -3, |