]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
We are an OR if ORPort *or* ORBindAddress is set; similarly for being an OP
authorNick Mathewson <nickm@torproject.org>
Sun, 15 Aug 2004 20:16:26 +0000 (20:16 +0000)
committerNick Mathewson <nickm@torproject.org>
Sun, 15 Aug 2004 20:16:26 +0000 (20:16 +0000)
svn:r2237

src/or/main.c

index 74b79c6346d1711250e5900127e00f2f88540de1..fdd0aed81c2bc38594f8eca92149835d23828c89 100644 (file)
@@ -465,7 +465,7 @@ int clique_mode(void) {
 /** Return true iff we are trying to be a server.
  */
 int server_mode(void) {
-  return (options.ORPort != 0);
+  return (options.ORPort != 0 || options.ORBindAddress);
 }
 
 /** Remember if we've advertised ourselves to the dirservers. */
@@ -479,7 +479,7 @@ int advertised_server_mode(void) {
 
 /** Return true iff we are trying to be a socks proxy. */
 int proxy_mode(void) {
-  return (options.SocksPort != 0);
+  return (options.SocksPort != 0 || options.SocksBindAddress);
 }
 
 /** Perform regular maintenance tasks.  This function gets run once per