Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin J. Thompson
Tor
Commits
9b0b2aef
Unverified
Commit
9b0b2aef
authored
5 years ago
by
teor
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1
parents
fb541ffc
54eec534
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
changes/bug32778
+3
-0
3 additions, 0 deletions
changes/bug32778
src/app/main/main.c
+2
-2
2 additions, 2 deletions
src/app/main/main.c
src/app/main/main.h
+3
-0
3 additions, 0 deletions
src/app/main/main.h
src/app/main/ntmain.c
+7
-0
7 additions, 0 deletions
src/app/main/ntmain.c
with
15 additions
and
2 deletions
changes/bug32778
0 → 100644
+
3
−
0
View file @
9b0b2aef
o Minor bugfixes (windows service):
- Initialize publish/subscribe system when running as a windows service.
Fixes bug 32778; bugfix on 0.4.1.1-alpha.
This diff is collapsed.
Click to expand it.
src/app/main/main.c
+
2
−
2
View file @
9b0b2aef
...
...
@@ -1236,7 +1236,7 @@ run_tor_main_loop(void)
}
/** Install the publish/subscribe relationships for all the subsystems. */
static
void
void
pubsub_install
(
void
)
{
pubsub_builder_t
*
builder
=
pubsub_builder_new
();
...
...
@@ -1248,7 +1248,7 @@ pubsub_install(void)
/** Connect the mainloop to its publish/subscribe message delivery events if
* appropriate, and configure the global channels appropriately. */
static
void
void
pubsub_connect
(
void
)
{
if
(
get_options
()
->
command
==
CMD_RUN_TOR
)
{
...
...
This diff is collapsed.
Click to expand it.
src/app/main/main.h
+
3
−
0
View file @
9b0b2aef
...
...
@@ -25,4 +25,7 @@ int tor_init(int argc, char **argv);
int
run_tor_main_loop
(
void
);
void
pubsub_install
(
void
);
void
pubsub_connect
(
void
);
#endif
/* !defined(TOR_MAIN_H) */
This diff is collapsed.
Click to expand it.
src/app/main/ntmain.c
+
7
−
0
View file @
9b0b2aef
...
...
@@ -283,7 +283,9 @@ nt_service_body(int argc, char **argv)
return
;
}
pubsub_install
();
r
=
tor_init
(
backup_argc
,
backup_argv
);
if
(
r
)
{
/* Failed to start the Tor service */
r
=
NT_SERVICE_ERROR_TORINIT_FAILED
;
...
...
@@ -294,6 +296,8 @@ nt_service_body(int argc, char **argv)
return
;
}
pubsub_connect
();
/* Set the service's status to SERVICE_RUNNING and start the main
* event loop */
service_status
.
dwCurrentState
=
SERVICE_RUNNING
;
...
...
@@ -322,9 +326,12 @@ nt_service_main(void)
errmsg
=
format_win32_error
(
result
);
printf
(
"Service error %d : %s
\n
"
,
(
int
)
result
,
errmsg
);
tor_free
(
errmsg
);
pubsub_install
();
if
(
result
==
ERROR_FAILED_SERVICE_CONTROLLER_CONNECT
)
{
if
(
tor_init
(
backup_argc
,
backup_argv
))
return
;
pubsub_connect
();
switch
(
get_options
()
->
command
)
{
case
CMD_RUN_TOR
:
run_tor_main_loop
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment