aboutsummaryrefslogtreecommitdiff
path: root/src/app/main/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-01-06 09:19:09 -0500
committerNick Mathewson <nickm@torproject.org>2020-01-06 09:25:23 -0500
commitb6f099672b90cb606d89bfcb0cae01ea49e46b9c (patch)
tree72cabc1ae7b8173d2dba4a442e62657ce383c1d9 /src/app/main/main.c
parent5c240db0bf7751d74ba438a1ca4ef0d051a53df7 (diff)
downloadtor-b6f099672b90cb606d89bfcb0cae01ea49e46b9c.tar.gz
tor-b6f099672b90cb606d89bfcb0cae01ea49e46b9c.zip
Make ntmain.h functions stubs when NT_SERVICE not enabled.
This lets us simplify main.c a little, and avoid a practracker exception. Followup from #32883.
Diffstat (limited to 'src/app/main/main.c')
-rw-r--r--src/app/main/main.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/app/main/main.c b/src/app/main/main.c
index 2a5cb4aa07..9c60d3c0f5 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -1238,15 +1238,10 @@ tor_run_main(const tor_main_configuration_t *tor_cfg)
memcpy(argv + tor_cfg->argc, tor_cfg->argv_owned,
tor_cfg->argc_owned*sizeof(char*));
-#ifdef NT_SERVICE
- {
- int done = 0;
- result = nt_service_parse_options(argc, argv, &done);
- if (done) {
- goto done;
- }
- }
-#endif /* defined(NT_SERVICE) */
+ int done = 0;
+ result = nt_service_parse_options(argc, argv, &done);
+ if (done)
+ goto done;
pubsub_install();
@@ -1288,9 +1283,7 @@ tor_run_main(const tor_main_configuration_t *tor_cfg)
switch (get_options()->command) {
case CMD_RUN_TOR:
-#ifdef NT_SERVICE
nt_service_set_state(SERVICE_RUNNING);
-#endif
result = run_tor_main_loop();
break;
case CMD_KEYGEN: