From ad4eca60ec0839abdaff69a0a896436cbd5b30d6 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Thu, 21 Apr 2005 10:40:48 +0000 Subject: add geoff's NoPublish patch svn:r4084 --- src/or/router.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/or/router.c') diff --git a/src/or/router.c b/src/or/router.c index 5c3b416245..dc61dea58f 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -472,18 +472,23 @@ int proxy_mode(or_options_t *options) { return (options->SocksPort != 0 || options->SocksBindAddress); } -/** Decide if we're a publishable server or just a client. We are a server if: +/** Decide if we're a publishable server. We are a publishable server if: + * - We don't have the ClientOnly option set + * and + * - We don't have the NoPublish option set + * and + * - We have ORPort set + * and + * - We believe we are reachable from the outside; or * - We have the AuthoritativeDirectory option set. - * or - * - We don't have the ClientOnly option set; and - * - We have ORPort set; and - * - We believe we are reachable from the outside. */ static int decide_if_publishable_server(time_t now) { or_options_t *options = get_options(); if (options->ClientOnly) return 0; + if (options->NoPublish) + return 0; if (!server_mode(options)) return 0; if (options->AuthoritativeDir) -- cgit v1.2.3-54-g00ecf