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

[or-cvs] forward-port the --hash-password bug, plus other nearby fixes



Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	main.c 
Log Message:
forward-port the --hash-password bug, plus other nearby fixes


Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.518
retrieving revision 1.519
diff -u -d -r1.518 -r1.519
--- main.c	17 Jun 2005 20:37:21 -0000	1.518
+++ main.c	19 Jun 2005 08:35:46 -0000	1.519
@@ -963,6 +963,13 @@
 {
   int loop_result;
 
+  /* only spawn dns handlers if we're a router */
+  if (server_mode(get_options())) {
+    dns_init(); /* initialize the dns resolve tree, and spawn workers */
+  }
+
+  handle_signals(1);
+
   /* load the private keys, if we're supposed to have them, and set up the
    * TLS context. */
   if (! identity_key_is_set()) {
@@ -1313,14 +1320,6 @@
     log_fn(LOG_WARN,"You are running Tor as root. You don't need to, and you probably shouldn't.");
 #endif
 
-  /* 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 */
-    /* XXX really, this should get moved to do_main_loop */
-  }
-
-  handle_signals(1);
-
   crypto_global_init();
   if (crypto_seed_rng()) {
     log_fn(LOG_ERR, "Unable to seed random number generator. Exiting.");