aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorRobert Ransom <rransom.8774@gmail.com>2010-10-01 00:07:10 -0700
committerRobert Ransom <rransom.8774@gmail.com>2010-10-04 17:57:29 -0700
commit89dffade8da372e296ae2d564dda102e9a7d566b (patch)
tree8b3afeec51ba113a811047718c4a35d2442643f4 /src/or/router.c
parent1b8c8059c72940e47afa787fe50adbcfeb192895 (diff)
downloadtor-89dffade8da372e296ae2d564dda102e9a7d566b.tar.gz
tor-89dffade8da372e296ae2d564dda102e9a7d566b.zip
Add public_server_mode function.
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 8b3a1849ac..bc0e67c9b8 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -976,6 +976,15 @@ server_mode(or_options_t *options)
return (options->ORPort != 0 || options->ORListenAddress);
}
+/** Return true iff we are trying to be a non-bridge server.
+ */
+int
+public_server_mode(or_options_t *options)
+{
+ if (!server_mode(options)) return 0;
+ return (!options->BridgeRelay);
+}
+
/** Return true iff the combination of options in <b>options</b> and parameters
* in the consensus mean that we don't want to allow exits from circuits
* we got from addresses not known to be servers. */