[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] pay more attention to the ClientOnly config option
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
connection.c router.c
Log Message:
pay more attention to the ClientOnly config option
Index: connection.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.374
retrieving revision 1.375
diff -u -d -r1.374 -r1.375
--- connection.c 8 Jun 2005 04:55:06 -0000 1.374
+++ connection.c 9 Jun 2005 08:54:42 -0000 1.375
@@ -824,7 +824,8 @@
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,
Index: router.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -d -r1.177 -r1.178
--- router.c 8 Jun 2005 19:45:17 -0000 1.177
+++ router.c 9 Jun 2005 08:54:42 -0000 1.178
@@ -451,6 +451,7 @@
/** 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);
}