]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Call monotime_init() earlier.
authorNick Mathewson <nickm@torproject.org>
Tue, 31 Jan 2017 18:02:49 +0000 (13:02 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 31 Jan 2017 18:02:49 +0000 (13:02 -0500)
We need to call it before nt_service_parse_options(), since
nt_service_parse_options() can call back into nt_service_main(),
which calls do_main_loop().

Fixes bug 21356; bugfix on 0.2.9.1-alpha.

changes/ticket21356 [new file with mode: 0644]
src/or/main.c

diff --git a/changes/ticket21356 b/changes/ticket21356
new file mode 100644 (file)
index 0000000..394238b
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (Windows services):
+    - Be sure to initialize the monotonic time subsystem before using it,
+      even when running as an NT service.
+      Fixes bug 21356; bugfix on 0.2.9.1-alpha.
index 66a8571901748edbd30a7995f15c3954c771d1d7..89cfb2e2ffffa63c923a5c30d7981da597587a8a 100644 (file)
@@ -3443,6 +3443,7 @@ tor_main(int argc, char *argv[])
   update_approx_time(time(NULL));
   tor_threads_init();
   init_logging(0);
+  monotime_init();
 #ifdef USE_DMALLOC
   {
     /* Instruct OpenSSL to use our internal wrappers for malloc,
@@ -3476,8 +3477,6 @@ tor_main(int argc, char *argv[])
 #endif
   }
 
-  monotime_init();
-
   switch (get_options()->command) {
   case CMD_RUN_TOR:
 #ifdef NT_SERVICE