diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-22 16:37:20 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-22 16:37:20 +0000 |
commit | 167d266dbf618c856a87ac482668cd848651ab62 (patch) | |
tree | cb4e77e7d54d2dc8384e1455dda9ebd5de421d1e /src/or/dirserv.c | |
parent | 1e666bfcc105b6b650c072c10074d009dcdc50d3 (diff) | |
download | tor-167d266dbf618c856a87ac482668cd848651ab62.tar.gz tor-167d266dbf618c856a87ac482668cd848651ab62.zip |
Documentation and conformance for WRA_* returns.
shahn: "Add some documentation for the WRA_* family of functions, also make
sure that (hopefully) all functions that return was_router_added_t
don't return ints directly and that they don't refer to integers in
their documentation anymore."
svn:r17731
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 914fcc2f49..3fd6b7a566 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -653,13 +653,8 @@ dirserv_add_multiple_descriptors(const char *desc, uint8_t purpose, * the list of server descriptors. Set *<b>msg</b> to a message that should be * passed back to the origin of this descriptor. * - - * Return 2 if descriptor is well-formed and accepted; - * 1 if well-formed and accepted but origin should hear *msg; - * 0 if well-formed but redundant with one we already have; - * -1 if it is rejected and origin should hear *msg; + * Return the status of the operation * - * This function is only called when fresh descriptors are posted, not when * we re-load the cache. */ @@ -684,7 +679,7 @@ dirserv_add_descriptor(routerinfo_t *ri, const char **msg) ri->cache_info.signed_descriptor_body, ri->cache_info.signed_descriptor_len, *msg); routerinfo_free(ri); - return -1; + return ROUTER_AUTHDIR_REJECTS; } /* Check whether this descriptor is semantically identical to the last one @@ -704,7 +699,7 @@ dirserv_add_descriptor(routerinfo_t *ri, const char **msg) ri->cache_info.signed_descriptor_body, ri->cache_info.signed_descriptor_len, *msg); routerinfo_free(ri); - return 0; + return ROUTER_WAS_NOT_NEW; } if (control_event_is_interesting(EVENT_AUTHDIR_NEWDESCS)) { /* Make a copy of desc, since router_add_to_routerlist might free |