mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 01:13:38 +00:00
[SERVICES]
* Fix some format specifiers (part 2 of r58442). Thanks Amine :) * Remane two "global" static variables to avoid name collision warnings. svn path=/trunk/; revision=58443
This commit is contained in:
parent
94c53e8fbe
commit
4691b190f5
|
@ -36,10 +36,10 @@ LIST_ENTRY ImageListHead;
|
||||||
LIST_ENTRY ServiceListHead;
|
LIST_ENTRY ServiceListHead;
|
||||||
|
|
||||||
static RTL_RESOURCE DatabaseLock;
|
static RTL_RESOURCE DatabaseLock;
|
||||||
static DWORD dwResumeCount = 1;
|
static DWORD ResumeCount = 1;
|
||||||
|
|
||||||
static CRITICAL_SECTION ControlServiceCriticalSection;
|
static CRITICAL_SECTION ControlServiceCriticalSection;
|
||||||
static DWORD dwPipeTimeout = 30000; /* 30 Seconds */
|
static DWORD PipeTimeout = 30000; /* 30 Seconds */
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
@ -110,7 +110,7 @@ ScmCreateNewControlPipe(PSERVICE_IMAGE pServiceImage)
|
||||||
100,
|
100,
|
||||||
8000,
|
8000,
|
||||||
4,
|
4,
|
||||||
dwPipeTimeout,
|
PipeTimeout,
|
||||||
NULL);
|
NULL);
|
||||||
DPRINT("CreateNamedPipeW(%S) done\n", szControlPipeName);
|
DPRINT("CreateNamedPipeW(%S) done\n", szControlPipeName);
|
||||||
if (pServiceImage->hControlPipe == INVALID_HANDLE_VALUE)
|
if (pServiceImage->hControlPipe == INVALID_HANDLE_VALUE)
|
||||||
|
@ -380,7 +380,7 @@ ScmCreateNewServiceRecord(LPCWSTR lpServiceName,
|
||||||
lpService->lpDisplayName = lpService->lpServiceName;
|
lpService->lpDisplayName = lpService->lpServiceName;
|
||||||
|
|
||||||
/* Set the resume count */
|
/* Set the resume count */
|
||||||
lpService->dwResumeCount = dwResumeCount++;
|
lpService->dwResumeCount = ResumeCount++;
|
||||||
|
|
||||||
/* Append service record */
|
/* Append service record */
|
||||||
InsertTailList(&ServiceListHead,
|
InsertTailList(&ServiceListHead,
|
||||||
|
@ -941,7 +941,7 @@ ScmControlService(PSERVICE Service,
|
||||||
DPRINT1("dwError: ERROR_IO_PENDING\n");
|
DPRINT1("dwError: ERROR_IO_PENDING\n");
|
||||||
|
|
||||||
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
||||||
dwPipeTimeout);
|
PipeTimeout);
|
||||||
DPRINT1("WaitForSingleObject() returned %lu\n", dwError);
|
DPRINT1("WaitForSingleObject() returned %lu\n", dwError);
|
||||||
|
|
||||||
if (dwError == WAIT_TIMEOUT)
|
if (dwError == WAIT_TIMEOUT)
|
||||||
|
@ -995,7 +995,7 @@ ScmControlService(PSERVICE Service,
|
||||||
DPRINT1("dwError: ERROR_IO_PENDING\n");
|
DPRINT1("dwError: ERROR_IO_PENDING\n");
|
||||||
|
|
||||||
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
||||||
dwPipeTimeout);
|
PipeTimeout);
|
||||||
DPRINT1("WaitForSingleObject() returned %lu\n", dwError);
|
DPRINT1("WaitForSingleObject() returned %lu\n", dwError);
|
||||||
|
|
||||||
if (dwError == WAIT_TIMEOUT)
|
if (dwError == WAIT_TIMEOUT)
|
||||||
|
@ -1192,7 +1192,7 @@ ScmSendStartCommand(PSERVICE Service,
|
||||||
DPRINT1("dwError: ERROR_IO_PENDING\n");
|
DPRINT1("dwError: ERROR_IO_PENDING\n");
|
||||||
|
|
||||||
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
||||||
dwPipeTimeout);
|
PipeTimeout);
|
||||||
DPRINT1("WaitForSingleObject() returned %lu\n", dwError);
|
DPRINT1("WaitForSingleObject() returned %lu\n", dwError);
|
||||||
|
|
||||||
if (dwError == WAIT_TIMEOUT)
|
if (dwError == WAIT_TIMEOUT)
|
||||||
|
@ -1246,7 +1246,7 @@ ScmSendStartCommand(PSERVICE Service,
|
||||||
DPRINT1("dwError: ERROR_IO_PENDING\n");
|
DPRINT1("dwError: ERROR_IO_PENDING\n");
|
||||||
|
|
||||||
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
||||||
dwPipeTimeout);
|
PipeTimeout);
|
||||||
DPRINT1("WaitForSingleObject() returned %lu\n", dwError);
|
DPRINT1("WaitForSingleObject() returned %lu\n", dwError);
|
||||||
|
|
||||||
if (dwError == WAIT_TIMEOUT)
|
if (dwError == WAIT_TIMEOUT)
|
||||||
|
@ -1354,7 +1354,7 @@ ScmWaitForServiceConnect(PSERVICE Service)
|
||||||
DPRINT("dwError: ERROR_IO_PENDING\n");
|
DPRINT("dwError: ERROR_IO_PENDING\n");
|
||||||
|
|
||||||
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
||||||
dwPipeTimeout);
|
PipeTimeout);
|
||||||
DPRINT("WaitForSingleObject() returned %lu\n", dwError);
|
DPRINT("WaitForSingleObject() returned %lu\n", dwError);
|
||||||
|
|
||||||
if (dwError == WAIT_TIMEOUT)
|
if (dwError == WAIT_TIMEOUT)
|
||||||
|
@ -1411,7 +1411,7 @@ ScmWaitForServiceConnect(PSERVICE Service)
|
||||||
DPRINT("dwError: ERROR_IO_PENDING\n");
|
DPRINT("dwError: ERROR_IO_PENDING\n");
|
||||||
|
|
||||||
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
||||||
dwPipeTimeout);
|
PipeTimeout);
|
||||||
if (dwError == WAIT_TIMEOUT)
|
if (dwError == WAIT_TIMEOUT)
|
||||||
{
|
{
|
||||||
DPRINT("WaitForSingleObject() returned WAIT_TIMEOUT\n");
|
DPRINT("WaitForSingleObject() returned WAIT_TIMEOUT\n");
|
||||||
|
@ -1927,7 +1927,7 @@ ScmInitNamedPipeCriticalSection(VOID)
|
||||||
L"ServicesPipeTimeout",
|
L"ServicesPipeTimeout",
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
(LPBYTE)&dwPipeTimeout,
|
(LPBYTE)&PipeTimeout,
|
||||||
&dwKeySize);
|
&dwKeySize);
|
||||||
|
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
|
|
|
@ -153,7 +153,7 @@ ScmNamedPipeHandleRequest(PVOID Request,
|
||||||
PVOID Reply,
|
PVOID Reply,
|
||||||
LPDWORD ReplySize)
|
LPDWORD ReplySize)
|
||||||
{
|
{
|
||||||
DbgPrint("SCM READ: %s\n", Request);
|
DbgPrint("SCM READ: %p\n", Request);
|
||||||
|
|
||||||
*ReplySize = 0;
|
*ReplySize = 0;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -173,7 +173,7 @@ ScmNamedPipeThread(LPVOID Context)
|
||||||
|
|
||||||
hPipe = (HANDLE)Context;
|
hPipe = (HANDLE)Context;
|
||||||
|
|
||||||
DPRINT("ScmNamedPipeThread(%x) - Accepting SCM commands through named pipe\n", hPipe);
|
DPRINT("ScmNamedPipeThread(%lu) - Accepting SCM commands through named pipe\n", hPipe);
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
@ -201,13 +201,13 @@ ScmNamedPipeThread(LPVOID Context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("ScmNamedPipeThread(%x) - Disconnecting named pipe connection\n", hPipe);
|
DPRINT("ScmNamedPipeThread(%lu) - Disconnecting named pipe connection\n", hPipe);
|
||||||
|
|
||||||
FlushFileBuffers(hPipe);
|
FlushFileBuffers(hPipe);
|
||||||
DisconnectNamedPipe(hPipe);
|
DisconnectNamedPipe(hPipe);
|
||||||
CloseHandle(hPipe);
|
CloseHandle(hPipe);
|
||||||
|
|
||||||
DPRINT("ScmNamedPipeThread(%x) - Done.\n", hPipe);
|
DPRINT("ScmNamedPipeThread(%lu) - Done.\n", hPipe);
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -278,7 +278,7 @@ DWORD WINAPI
|
||||||
ScmNamedPipeListenerThread(LPVOID Context)
|
ScmNamedPipeListenerThread(LPVOID Context)
|
||||||
{
|
{
|
||||||
// HANDLE hPipe;
|
// HANDLE hPipe;
|
||||||
DPRINT("ScmNamedPipeListenerThread(%x) - aka SCM.\n", Context);
|
DPRINT("ScmNamedPipeListenerThread(%p) - aka SCM.\n", Context);
|
||||||
|
|
||||||
// hPipe = (HANDLE)Context;
|
// hPipe = (HANDLE)Context;
|
||||||
for (;;)
|
for (;;)
|
||||||
|
@ -294,7 +294,7 @@ ScmNamedPipeListenerThread(LPVOID Context)
|
||||||
DPRINT("\nSCM: named pipe session created.\n");
|
DPRINT("\nSCM: named pipe session created.\n");
|
||||||
Sleep(10);
|
Sleep(10);
|
||||||
}
|
}
|
||||||
DPRINT("\n\nWARNING: ScmNamedPipeListenerThread(%x) - Aborted.\n\n", Context);
|
DPRINT("\n\nWARNING: ScmNamedPipeListenerThread(%p) - Aborted.\n\n", Context);
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue