summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-06-19 08:35:46 +0000
committerRoger Dingledine <arma@torproject.org>2005-06-19 08:35:46 +0000
commitb5fd75a063e487e845c98530cd2032f303d34462 (patch)
treef972f245337b7126c19b79e545d2d44c7c9dd486
parentcc57e1cab1524b2e7e7a57f0239f81f4573b55aa (diff)
downloadtor-b5fd75a063e487e845c98530cd2032f303d34462.tar.gz
tor-b5fd75a063e487e845c98530cd2032f303d34462.zip
forward-port the --hash-password bug, plus other nearby fixes
svn:r4459
-rw-r--r--src/or/main.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 66eb2fd787..4f11e8a5ce 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -963,6 +963,13 @@ do_main_loop(void)
{
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 @@ tor_init(int argc, char *argv[])
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.");