]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Call it a BUG to use -1 in authdir_mode_handles_descs
authorNick Mathewson <nickm@torproject.org>
Wed, 21 Jun 2017 16:38:02 +0000 (12:38 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 21 Jun 2017 17:49:17 +0000 (13:49 -0400)
src/or/router.c

index f2052f43b075d9b6f75e542140407b3e2baff40d..100c4cc949bd5f483783c4219a0a7121ddf3e983 100644 (file)
@@ -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);