From 167d266dbf618c856a87ac482668cd848651ab62 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 22 Dec 2008 16:37:20 +0000 Subject: 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 --- src/or/or.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/or/or.h') diff --git a/src/or/or.h b/src/or/or.h index ffb9894438..ff578b0b4b 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -4385,19 +4385,25 @@ typedef enum was_router_added_t { static int WRA_WAS_ADDED(was_router_added_t s); static int WRA_WAS_OUTDATED(was_router_added_t s); static int WRA_WAS_REJECTED(was_router_added_t s); -/**DOCDOC*/ +/** Return true iff the descriptor was added. It might still be necessary to + * check whether the descriptor generator should be notified. + */ static INLINE int WRA_WAS_ADDED(was_router_added_t s) { return s == ROUTER_ADDED_SUCCESSFULLY || s == ROUTER_ADDED_NOTIFY_GENERATOR; } -/**DOCDOC*/ +/** Return true iff the descriptor was not added because it was either: + * - not in the consensus + * - neither in the consensus nor in any networkstatus document + * - it was outdated. + */ static INLINE int WRA_WAS_OUTDATED(was_router_added_t s) { return (s == ROUTER_WAS_NOT_NEW || s == ROUTER_NOT_IN_CONSENSUS || s == ROUTER_NOT_IN_CONSENSUS_OR_NETWORKSTATUS); } -/**DOCDOC*/ +/** Return true iff the descriptor rejected because it was malformed. */ static INLINE int WRA_WAS_REJECTED(was_router_added_t s) { return (s == ROUTER_AUTHDIR_REJECTS); -- cgit v1.2.3-54-g00ecf