mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
pay more attention to the ClientOnly config option
svn:r4367
This commit is contained in:
+2
-1
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user