summaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-06-21 12:38:02 -0400
committerNick Mathewson <nickm@torproject.org>2017-06-21 13:49:17 -0400
commit35d6313500f3ea07a10b565515d5e9953fc7f1da (patch)
tree213d8411f383fc77dc3638e8ba61746492661196 /src/or/router.c
parentad97714f22ace023bda9f334687239127a71413a (diff)
downloadtor-35d6313500f3ea07a10b565515d5e9953fc7f1da.tar.gz
tor-35d6313500f3ea07a10b565515d5e9953fc7f1da.zip
Call it a BUG to use -1 in authdir_mode_handles_descs
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c
index f2052f43b0..100c4cc949 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1598,11 +1598,12 @@ authdir_mode_v3(const or_options_t *options)
}
/** Return true iff we are an authoritative directory server that is
* authoritative about receiving and serving descriptors of type
- * <b>purpose</b> on its dirport. Use -1 for "any purpose". */
+ * <b>purpose</b> on its dirport.
+ */
int
authdir_mode_handles_descs(const or_options_t *options, int purpose)
{
- if (purpose < 0)
+ if (BUG(purpose < 0)) /* Deprecated. */
return authdir_mode(options);
else if (purpose == ROUTER_PURPOSE_GENERAL)
return authdir_mode_v3(options);