summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-06-09 08:54:42 +0000
committerRoger Dingledine <arma@torproject.org>2005-06-09 08:54:42 +0000
commitcfc89f875330c9cc015f745cb12c899352d39e43 (patch)
tree9fea23ce861cbf6190fbc8affcf8d5fea77f92e3
parent47fe49c2a034b6686be3e4a31cb3a4d14676d1d0 (diff)
downloadtor-cfc89f875330c9cc015f745cb12c899352d39e43.tar.gz
tor-cfc89f875330c9cc015f745cb12c899352d39e43.zip
pay more attention to the ClientOnly config option
svn:r4367
-rw-r--r--src/or/connection.c3
-rw-r--r--src/or/router.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 263762f484..a87f27f8a8 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -824,7 +824,8 @@ static int retry_listeners(int type, struct config_line_t *cfg,
int retry_all_listeners(int force) {
or_options_t *options = get_options();
- if (retry_listeners(CONN_TYPE_OR_LISTENER, options->ORBindAddress,
+ if (server_mode(options) &&
+ retry_listeners(CONN_TYPE_OR_LISTENER, options->ORBindAddress,
options->ORPort, "0.0.0.0", force)<0)
return -1;
if (retry_listeners(CONN_TYPE_DIR_LISTENER, options->DirBindAddress,
diff --git a/src/or/router.c b/src/or/router.c
index 56ad0d0caf..1f67e5bd56 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -451,6 +451,7 @@ int clique_mode(or_options_t *options) {
/** Return true iff we are trying to be a server.
*/
int server_mode(or_options_t *options) {
+ if (options->ClientOnly) return 0;
return (options->ORPort != 0 || options->ORBindAddress);
}