mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 17:07:16 +00:00
advapi32: service_control_dispatcher(): Fixed invalid pipe test to display GetLastError() before it gets overwritten.
This commit is contained in:
parent
9649ca2aa2
commit
65d2f8a68d
|
@ -686,6 +686,11 @@ static DWORD WINAPI service_control_dispatcher(LPVOID arg)
|
|||
name = service_get_pipe_name(service->name);
|
||||
pipe = CreateNamedPipeW(name, PIPE_ACCESS_DUPLEX,
|
||||
PIPE_TYPE_BYTE|PIPE_WAIT, 1, 256, 256, 10000, NULL );
|
||||
|
||||
if (pipe==INVALID_HANDLE_VALUE)
|
||||
ERR("failed to create pipe for %s, error = %d\n",
|
||||
debugstr_w(service->name), GetLastError());
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, name);
|
||||
|
||||
/* let the process who started us know we've tried to create a pipe */
|
||||
|
@ -693,12 +698,7 @@ static DWORD WINAPI service_control_dispatcher(LPVOID arg)
|
|||
SetEvent(event);
|
||||
CloseHandle(event);
|
||||
|
||||
if (pipe==INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ERR("failed to create pipe for %s, error = %d\n",
|
||||
debugstr_w(service->name), GetLastError());
|
||||
return 0;
|
||||
}
|
||||
if (pipe==INVALID_HANDLE_VALUE) return 0;
|
||||
|
||||
/* dispatcher loop */
|
||||
while (1)
|
||||
|
|
Loading…
Reference in a new issue