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
0819c739
Commit
0819c739
authored
Mar 02, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Mar 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Remove pipe argument from service_send_command function.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
20633b29
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
13 deletions
+10
-13
rpc.c
programs/services/rpc.c
+8
-10
services.c
programs/services/services.c
+1
-1
services.h
programs/services/services.h
+1
-2
No files found.
programs/services/rpc.c
View file @
0819c739
...
...
@@ -992,15 +992,14 @@ static BOOL service_accepts_control(const struct service_entry *service, DWORD d
/******************************************************************************
* service_send_command
*/
BOOL
service_send_command
(
struct
service_entry
*
service
,
HANDLE
pipe
,
const
void
*
data
,
DWORD
size
,
DWORD
*
result
)
BOOL
service_send_command
(
struct
service_entry
*
service
,
const
void
*
data
,
DWORD
size
,
DWORD
*
result
)
{
OVERLAPPED
overlapped
;
DWORD
count
,
ret
;
BOOL
r
;
overlapped
.
hEvent
=
service
->
overlapped_event
;
r
=
WriteFile
(
pipe
,
data
,
size
,
&
count
,
&
overlapped
);
r
=
WriteFile
(
service
->
control_
pipe
,
data
,
size
,
&
count
,
&
overlapped
);
if
(
!
r
&&
GetLastError
()
==
ERROR_IO_PENDING
)
{
ret
=
WaitForSingleObject
(
service
->
overlapped_event
,
service_pipe_timeout
);
...
...
@@ -1010,7 +1009,7 @@ BOOL service_send_command( struct service_entry *service, HANDLE pipe,
*
result
=
ERROR_SERVICE_REQUEST_TIMEOUT
;
return
FALSE
;
}
r
=
GetOverlappedResult
(
pipe
,
&
overlapped
,
&
count
,
FALSE
);
r
=
GetOverlappedResult
(
service
->
control_pipe
,
&
overlapped
,
&
count
,
FALSE
);
}
if
(
!
r
||
count
!=
size
)
{
...
...
@@ -1018,7 +1017,7 @@ BOOL service_send_command( struct service_entry *service, HANDLE pipe,
*
result
=
(
!
r
?
GetLastError
()
:
ERROR_WRITE_FAULT
);
return
FALSE
;
}
r
=
ReadFile
(
pipe
,
result
,
sizeof
*
result
,
&
count
,
&
overlapped
);
r
=
ReadFile
(
service
->
control_
pipe
,
result
,
sizeof
*
result
,
&
count
,
&
overlapped
);
if
(
!
r
&&
GetLastError
()
==
ERROR_IO_PENDING
)
{
ret
=
WaitForSingleObject
(
service
->
overlapped_event
,
service_pipe_timeout
);
...
...
@@ -1028,7 +1027,7 @@ BOOL service_send_command( struct service_entry *service, HANDLE pipe,
*
result
=
ERROR_SERVICE_REQUEST_TIMEOUT
;
return
FALSE
;
}
r
=
GetOverlappedResult
(
pipe
,
&
overlapped
,
&
count
,
FALSE
);
r
=
GetOverlappedResult
(
service
->
control_pipe
,
&
overlapped
,
&
count
,
FALSE
);
}
if
(
!
r
||
count
!=
sizeof
*
result
)
{
...
...
@@ -1045,7 +1044,7 @@ BOOL service_send_command( struct service_entry *service, HANDLE pipe,
/******************************************************************************
* service_send_control
*/
static
BOOL
service_send_control
(
struct
service_entry
*
service
,
HANDLE
pipe
,
DWORD
dwControl
,
DWORD
*
result
)
static
BOOL
service_send_control
(
struct
service_entry
*
service
,
DWORD
dwControl
,
DWORD
*
result
)
{
service_start_info
*
ssi
;
DWORD
len
;
...
...
@@ -1061,7 +1060,7 @@ static BOOL service_send_control(struct service_entry *service, HANDLE pipe, DWO
ssi
->
name_size
=
strlenW
(
service
->
name
)
+
1
;
strcpyW
(
ssi
->
data
,
service
->
name
);
r
=
service_send_command
(
service
,
pipe
,
ssi
,
ssi
->
total_size
,
result
);
r
=
service_send_command
(
service
,
ssi
,
ssi
->
total_size
,
result
);
HeapFree
(
GetProcessHeap
(),
0
,
ssi
);
return
r
;
}
...
...
@@ -1182,8 +1181,7 @@ DWORD __cdecl svcctl_ControlService(
ret
=
WaitForSingleObject
(
control_mutex
,
30000
);
if
(
ret
==
WAIT_OBJECT_0
)
{
service_send_control
(
service
->
service_entry
,
service
->
service_entry
->
control_pipe
,
dwControl
,
&
result
);
service_send_control
(
service
->
service_entry
,
dwControl
,
&
result
);
if
(
lpServiceStatus
)
{
...
...
programs/services/services.c
View file @
0819c739
...
...
@@ -834,7 +834,7 @@ static BOOL service_send_start_message(struct service_entry *service, HANDLE pro
}
*
p
=
0
;
r
=
service_send_command
(
service
,
s
ervice
->
control_pipe
,
s
si
,
ssi
->
total_size
,
&
result
);
r
=
service_send_command
(
service
,
ssi
,
ssi
->
total_size
,
&
result
);
if
(
r
&&
result
)
{
SetLastError
(
result
);
...
...
programs/services/services.h
View file @
0819c739
...
...
@@ -80,8 +80,7 @@ void service_lock_exclusive(struct service_entry *service);
void
service_unlock
(
struct
service_entry
*
service
);
DWORD
service_start
(
struct
service_entry
*
service
,
DWORD
service_argc
,
LPCWSTR
*
service_argv
);
void
service_terminate
(
struct
service_entry
*
service
);
BOOL
service_send_command
(
struct
service_entry
*
service
,
HANDLE
pipe
,
const
void
*
data
,
DWORD
size
,
DWORD
*
result
);
BOOL
service_send_command
(
struct
service_entry
*
service
,
const
void
*
data
,
DWORD
size
,
DWORD
*
result
);
extern
HANDLE
g_hStartedEvent
;
...
...
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