[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] backport ClientOnly fixes



Update of /home/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/tor-010x/tor/src/or

Modified Files:
      Tag: tor-0_1_0-patches
	connection.c router.c 
Log Message:
backport ClientOnly fixes


Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.373
retrieving revision 1.373.2.1
diff -u -d -r1.373 -r1.373.2.1
--- connection.c	23 May 2005 05:20:52 -0000	1.373
+++ connection.c	9 Jun 2005 09:16:12 -0000	1.373.2.1
@@ -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: /home/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.176
retrieving revision 1.176.2.1
diff -u -d -r1.176 -r1.176.2.1
--- router.c	27 May 2005 17:43:43 -0000	1.176
+++ router.c	9 Jun 2005 09:16:12 -0000	1.176.2.1
@@ -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);
 }