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
51f36c22
Commit
51f36c22
authored
Aug 19, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Aug 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Return an error instead of BOOL from process_send_start_message.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
68c1765a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
services.c
programs/services/services.c
+9
-16
No files found.
programs/services/services.c
View file @
51f36c22
...
...
@@ -838,14 +838,13 @@ static DWORD service_is_running(struct service_entry *service)
/******************************************************************************
* process_send_start_message
*/
static
BOOL
process_send_start_message
(
struct
process_entry
*
process
,
const
WCHAR
*
name
,
LPCWSTR
*
argv
,
DWORD
argc
)
static
DWORD
process_send_start_message
(
struct
process_entry
*
process
,
const
WCHAR
*
name
,
const
WCHAR
*
*
argv
,
DWORD
argc
)
{
OVERLAPPED
overlapped
;
DWORD
i
,
len
,
result
;
service_start_info
*
ssi
;
LPWSTR
p
;
BOOL
r
;
WINE_TRACE
(
"%p %s %p %d
\n
"
,
process
,
wine_dbgstr_w
(
name
),
argv
,
argc
);
...
...
@@ -862,13 +861,13 @@ static BOOL process_send_start_message(struct process_entry *process, const WCHA
if
(
!
HasOverlappedIoCompleted
(
&
overlapped
))
{
WINE_ERR
(
"service %s failed to start
\n
"
,
wine_dbgstr_w
(
name
));
return
FALSE
;
return
ERROR_SERVICE_REQUEST_TIMEOUT
;
}
}
else
if
(
GetLastError
()
!=
ERROR_PIPE_CONNECTED
)
{
WINE_ERR
(
"pipe connect failed
\n
"
);
return
FALSE
;
return
ERROR_SERVICE_REQUEST_TIMEOUT
;
}
}
...
...
@@ -894,16 +893,11 @@ static BOOL process_send_start_message(struct process_entry *process, const WCHA
}
*
p
=
0
;
r
=
process_send_command
(
process
,
ssi
,
ssi
->
total_size
,
&
result
);
if
(
r
&&
result
)
{
SetLastError
(
result
);
r
=
FALSE
;
}
HeapFree
(
GetProcessHeap
(),
0
,
ssi
);
if
(
!
process_send_command
(
process
,
ssi
,
ssi
->
total_size
,
&
result
))
result
=
ERROR_SERVICE_REQUEST_TIMEOUT
;
return
r
;
HeapFree
(
GetProcessHeap
(),
0
,
ssi
);
return
result
;
}
DWORD
service_start
(
struct
service_entry
*
service
,
DWORD
service_argc
,
LPCWSTR
*
service_argv
)
...
...
@@ -914,8 +908,7 @@ DWORD service_start(struct service_entry *service, DWORD service_argc, LPCWSTR *
err
=
service_start_process
(
service
,
&
process
);
if
(
err
==
ERROR_SUCCESS
)
{
if
(
!
process_send_start_message
(
process
,
service
->
name
,
service_argv
,
service_argc
))
err
=
ERROR_SERVICE_REQUEST_TIMEOUT
;
err
=
process_send_start_message
(
process
,
service
->
name
,
service_argv
,
service_argc
);
if
(
err
==
ERROR_SUCCESS
)
err
=
process_wait_for_startup
(
process
);
...
...
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