[or-cvs] Only launch dns workers when we are actually starting a ser...

Nick Mathewson nickm at seul.org
Mon Dec 13 00:09:02 UTC 2004


Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv10900/src/or

Modified Files:
	main.c 
Log Message:
Only launch dns workers when we are actually starting a server.

Index: main.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.403
retrieving revision 1.404
diff -u -d -r1.403 -r1.404
--- main.c	7 Dec 2004 16:50:47 -0000	1.403
+++ main.c	13 Dec 2004 00:09:00 -0000	1.404
@@ -1097,7 +1097,8 @@
     log_fn(LOG_WARN,"You are running Tor as root. You don't need to, and you probably shouldn't.");
 #endif
 
-  if (server_mode(get_options())) { /* only spawn dns handlers if we're a router */
+  /* only spawn dns handlers if we're a router */
+  if (server_mode(get_options()) && get_options()->command == CMD_RUN_TOR) {
     dns_init(); /* initialize the dns resolve tree, and spawn workers */
   }
 



More information about the tor-commits mailing list