Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fe3f2e32
Commit
fe3f2e32
authored
Aug 29, 2011
by
Francois Gouget
Committed by
Alexandre Julliard
Aug 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: If a service is not started, then say so when ControlService() is called on it.
parent
eafb44d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
service.c
dlls/advapi32/tests/service.c
+1
-1
rpc.c
programs/services/rpc.c
+6
-6
No files found.
dlls/advapi32/tests/service.c
View file @
fe3f2e32
...
@@ -2095,7 +2095,7 @@ static DWORD try_start_stop(SC_HANDLE svc_handle, const char* name, DWORD is_nt4
...
@@ -2095,7 +2095,7 @@ static DWORD try_start_stop(SC_HANDLE svc_handle, const char* name, DWORD is_nt4
ret
=
ControlService
(
svc_handle
,
SERVICE_CONTROL_STOP
,
&
status
);
ret
=
ControlService
(
svc_handle
,
SERVICE_CONTROL_STOP
,
&
status
);
le2
=
GetLastError
();
le2
=
GetLastError
();
ok
(
!
ret
,
"%s: ControlService() should have failed
\n
"
,
name
);
ok
(
!
ret
,
"%s: ControlService() should have failed
\n
"
,
name
);
todo_wine
ok
(
le2
==
ERROR_SERVICE_NOT_ACTIVE
,
"%s: %d != ERROR_SERVICE_NOT_ACTIVE
\n
"
,
name
,
le2
);
ok
(
le2
==
ERROR_SERVICE_NOT_ACTIVE
,
"%s: %d != ERROR_SERVICE_NOT_ACTIVE
\n
"
,
name
,
le2
);
ok
(
status
.
dwCurrentState
==
SERVICE_STOPPED
||
ok
(
status
.
dwCurrentState
==
SERVICE_STOPPED
||
broken
(
is_nt4
),
/* NT4 returns a random value */
broken
(
is_nt4
),
/* NT4 returns a random value */
"%s: should be stopped state=%x
\n
"
,
name
,
status
.
dwCurrentState
);
"%s: should be stopped state=%x
\n
"
,
name
,
status
.
dwCurrentState
);
...
...
programs/services/rpc.c
View file @
fe3f2e32
...
@@ -1023,12 +1023,6 @@ DWORD __cdecl svcctl_ControlService(
...
@@ -1023,12 +1023,6 @@ DWORD __cdecl svcctl_ControlService(
lpServiceStatus
->
dwWaitHint
=
service
->
service_entry
->
status
.
dwWaitHint
;
lpServiceStatus
->
dwWaitHint
=
service
->
service_entry
->
status
.
dwWaitHint
;
}
}
if
(
!
service_accepts_control
(
service
->
service_entry
,
dwControl
))
{
service_unlock
(
service
->
service_entry
);
return
ERROR_INVALID_SERVICE_CONTROL
;
}
switch
(
service
->
service_entry
->
status
.
dwCurrentState
)
switch
(
service
->
service_entry
->
status
.
dwCurrentState
)
{
{
case
SERVICE_STOPPED
:
case
SERVICE_STOPPED
:
...
@@ -1043,6 +1037,12 @@ DWORD __cdecl svcctl_ControlService(
...
@@ -1043,6 +1037,12 @@ DWORD __cdecl svcctl_ControlService(
return
ERROR_SERVICE_CANNOT_ACCEPT_CTRL
;
return
ERROR_SERVICE_CANNOT_ACCEPT_CTRL
;
}
}
if
(
!
service_accepts_control
(
service
->
service_entry
,
dwControl
))
{
service_unlock
(
service
->
service_entry
);
return
ERROR_INVALID_SERVICE_CONTROL
;
}
/* prevent races by caching these variables and clearing them on
/* prevent races by caching these variables and clearing them on
* stop here instead of outside the services lock */
* stop here instead of outside the services lock */
control_mutex
=
service
->
service_entry
->
control_mutex
;
control_mutex
=
service
->
service_entry
->
control_mutex
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment