]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
In ntmain, call set_main_thread() before running the loop.
authorNick Mathewson <nickm@torproject.org>
Thu, 3 Aug 2017 13:07:28 +0000 (09:07 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 3 Aug 2017 13:09:08 +0000 (09:09 -0400)
Patch from Vort; fixes bug 23081; bugfix on fd992deeea76972 in
0.2.1.16-rc when set_main_thread() was introduced.

See the changes file for a list of all the symptoms this bug has
been causing when running Tor as a Windows Service.

changes/bug23081 [new file with mode: 0644]
src/or/ntmain.c

diff --git a/changes/bug23081 b/changes/bug23081
new file mode 100644 (file)
index 0000000..76c4e30
--- /dev/null
@@ -0,0 +1,8 @@
+  o Minor bugfixes (Windows service):
+    - When running as a Windows service, set the ID of the main thread
+      correctly. Failure to do so made us fail to send log messages
+      to the controller in 0.2.1.16-rc, slowed down controller
+      event delivery in 0.2.7.3-rc and later, and crash with an assertion
+      failure in 0.3.1.1-alpha. Fixes bug 23081; bugfix on 0.2.1.6-alpha.
+      Patch and diagnosis from "Vort".
+
index e848314043decc7b9d7b92600d4244227a8264ea..ddbe7a3e442d1ead28ee940f5dc003cbe0e6b6b8 100644 (file)
@@ -281,6 +281,7 @@ nt_service_body(int argc, char **argv)
    * event loop */
   service_status.dwCurrentState = SERVICE_RUNNING;
   service_fns.SetServiceStatus_fn(hStatus, &service_status);
+  set_main_thread();
   do_main_loop();
   tor_cleanup();
 }