]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Call run_tor_main_loop() in ntmain.c, rather than do_main_loop().
authorNick Mathewson <nickm@torproject.org>
Wed, 5 Dec 2018 15:31:43 +0000 (10:31 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 18 Dec 2018 18:55:08 +0000 (13:55 -0500)
Fixes bug 28612; bugfix on 0.3.5.3-alpha.

changes/bug28612 [new file with mode: 0644]
src/app/main/main.c
src/app/main/main.h
src/app/main/ntmain.c

diff --git a/changes/bug28612 b/changes/bug28612
new file mode 100644 (file)
index 0000000..559f254
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (windows services):
+    - Make Tor start correctly as an NT service again: previously it
+      was broken by refactoring.  Fixes bug 28612; bugfix on 0.3.5.3-alpha.
+      
index ae87add67df714df238e6a97bc1cc56368e7b65e..a2b7c084560790dc46fa56965a068bb7e116d015 100644 (file)
@@ -1269,7 +1269,7 @@ sandbox_init_filter(void)
   return cfg;
 }
 
-static int
+int
 run_tor_main_loop(void)
 {
   handle_signals();
index b64f2ef41757545c80faaa4892a9f060c090f281..23a436703ef799ef0cbcb1ff68acd1ba5803d020 100644 (file)
@@ -26,4 +26,6 @@ void tor_free_all(int postfork);
 
 int tor_init(int argc, char **argv);
 
+int run_tor_main_loop(void);
+
 #endif /* !defined(TOR_MAIN_H) */
index 800720a0b4b80d010a0bce9f2262dcd6fbf9f747..8d2135a587a6588ac2709682e3330f0ac0ed2ba1 100644 (file)
@@ -298,7 +298,7 @@ nt_service_body(int argc, char **argv)
   service_status.dwCurrentState = SERVICE_RUNNING;
   service_fns.SetServiceStatus_fn(hStatus, &service_status);
   set_main_thread();
-  do_main_loop();
+  run_tor_main_loop();
   tor_cleanup();
 }
 
@@ -326,7 +326,7 @@ nt_service_main(void)
         return;
       switch (get_options()->command) {
       case CMD_RUN_TOR:
-        do_main_loop();
+        run_tor_main_loop();
         break;
       case CMD_LIST_FINGERPRINT:
       case CMD_HASH_PASSWORD: