Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
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
Terraform modules
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
Tayshawnna Jackson
wine
Commits
955de31f
Commit
955de31f
authored
11 years ago
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msiexec: MSI service should report SERVICE_STOPPED when appropriate.
parent
957f7013
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
programs/msiexec/service.c
+8
-1
8 additions, 1 deletion
programs/msiexec/service.c
with
8 additions
and
1 deletion
programs/msiexec/service.c
+
8
−
1
View file @
955de31f
...
...
@@ -81,6 +81,8 @@ static BOOL UpdateSCMStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode,
static
void
WINAPI
ServiceCtrlHandler
(
DWORD
code
)
{
DWORD
state
=
SERVICE_RUNNING
;
WINE_TRACE
(
"%d
\n
"
,
code
);
switch
(
code
)
...
...
@@ -89,13 +91,14 @@ static void WINAPI ServiceCtrlHandler(DWORD code)
case
SERVICE_CONTROL_STOP
:
UpdateSCMStatus
(
SERVICE_STOP_PENDING
,
NO_ERROR
,
0
);
KillService
();
state
=
SERVICE_STOPPED
;
return
;
default:
fprintf
(
stderr
,
"Unhandled service control code: %d
\n
"
,
code
);
break
;
}
UpdateSCMStatus
(
SERVICE_RUNNING
,
NO_ERROR
,
0
);
UpdateSCMStatus
(
state
,
NO_ERROR
,
0
);
}
static
DWORD
WINAPI
ServiceExecutionThread
(
LPVOID
param
)
...
...
@@ -135,12 +138,14 @@ static void WINAPI ServiceMain(DWORD argc, LPSTR *argv)
{
fprintf
(
stderr
,
"Failed to create event
\n
"
);
KillService
();
UpdateSCMStatus
(
SERVICE_STOPPED
,
NO_ERROR
,
0
);
return
;
}
if
(
!
StartServiceThread
())
{
KillService
();
UpdateSCMStatus
(
SERVICE_STOPPED
,
NO_ERROR
,
0
);
return
;
}
...
...
@@ -148,6 +153,8 @@ static void WINAPI ServiceMain(DWORD argc, LPSTR *argv)
WaitForSingleObject
(
kill_event
,
INFINITE
);
KillService
();
UpdateSCMStatus
(
SERVICE_STOPPED
,
NO_ERROR
,
0
);
}
DWORD
DoService
(
void
)
...
...
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