mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Fix return value so we exit ServerMain correctly, thus we now see all log until death
svn path=/trunk/; revision=35871
This commit is contained in:
parent
4695ff389c
commit
f2b500d25c
1 changed files with 4 additions and 2 deletions
|
@ -94,8 +94,9 @@ CreateServers(PSERVICEINFO pServInfo)
|
|||
|
||||
if (hThread[i] == NULL)
|
||||
{
|
||||
_swprintf(buf, L"\nFailed to start %s server\n", Services[i].lpName);
|
||||
_swprintf(buf, L"\nError creating %s server thread\n", Services[i].lpName);
|
||||
LogEvent(buf, GetLastError(), 0, LOG_ALL);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
UpdateStatus(pServInfo, 0, 1);
|
||||
|
@ -116,7 +117,7 @@ CreateServers(PSERVICEINFO pServInfo)
|
|||
LogEvent(L"Detaching Winsock2", 0, 0, LOG_FILE);
|
||||
WSACleanup();
|
||||
|
||||
return 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID WINAPI
|
||||
|
@ -188,6 +189,7 @@ ServiceMain(DWORD argc, LPWSTR argv[])
|
|||
|
||||
if (!CreateServers(&servInfo))
|
||||
{
|
||||
LogEvent(L"Error creating servers", GetLastError(), 1, LOG_ALL);
|
||||
servInfo.servStatus.dwServiceSpecificExitCode = 1;
|
||||
UpdateStatus(&servInfo, SERVICE_STOPPED, 0);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue