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;
|
||||
|
||||
static RTL_RESOURCE DatabaseLock;
|
||||
static DWORD dwResumeCount = 1;
|
||||
static DWORD ResumeCount = 1;
|
||||
|
||||
static CRITICAL_SECTION ControlServiceCriticalSection;
|
||||
static DWORD dwPipeTimeout = 30000; /* 30 Seconds */
|
||||
static DWORD PipeTimeout = 30000; /* 30 Seconds */
|
||||
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
@ -110,7 +110,7 @@ ScmCreateNewControlPipe(PSERVICE_IMAGE pServiceImage)
|
|||
100,
|
||||
8000,
|
||||
4,
|
||||
dwPipeTimeout,
|
||||
PipeTimeout,
|
||||
NULL);
|
||||
DPRINT("CreateNamedPipeW(%S) done\n", szControlPipeName);
|
||||
if (pServiceImage->hControlPipe == INVALID_HANDLE_VALUE)
|
||||
|
@ -380,7 +380,7 @@ ScmCreateNewServiceRecord(LPCWSTR lpServiceName,
|
|||
lpService->lpDisplayName = lpService->lpServiceName;
|
||||
|
||||
/* Set the resume count */
|
||||
lpService->dwResumeCount = dwResumeCount++;
|
||||
lpService->dwResumeCount = ResumeCount++;
|
||||
|
||||
/* Append service record */
|
||||
InsertTailList(&ServiceListHead,
|
||||
|
@ -941,7 +941,7 @@ ScmControlService(PSERVICE Service,
|
|||
DPRINT1("dwError: ERROR_IO_PENDING\n");
|
||||
|
||||
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
||||
dwPipeTimeout);
|
||||
PipeTimeout);
|
||||
DPRINT1("WaitForSingleObject() returned %lu\n", dwError);
|
||||
|
||||
if (dwError == WAIT_TIMEOUT)
|
||||
|
@ -995,7 +995,7 @@ ScmControlService(PSERVICE Service,
|
|||
DPRINT1("dwError: ERROR_IO_PENDING\n");
|
||||
|
||||
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
||||
dwPipeTimeout);
|
||||
PipeTimeout);
|
||||
DPRINT1("WaitForSingleObject() returned %lu\n", dwError);
|
||||
|
||||
if (dwError == WAIT_TIMEOUT)
|
||||
|
@ -1192,7 +1192,7 @@ ScmSendStartCommand(PSERVICE Service,
|
|||
DPRINT1("dwError: ERROR_IO_PENDING\n");
|
||||
|
||||
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
||||
dwPipeTimeout);
|
||||
PipeTimeout);
|
||||
DPRINT1("WaitForSingleObject() returned %lu\n", dwError);
|
||||
|
||||
if (dwError == WAIT_TIMEOUT)
|
||||
|
@ -1246,7 +1246,7 @@ ScmSendStartCommand(PSERVICE Service,
|
|||
DPRINT1("dwError: ERROR_IO_PENDING\n");
|
||||
|
||||
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
||||
dwPipeTimeout);
|
||||
PipeTimeout);
|
||||
DPRINT1("WaitForSingleObject() returned %lu\n", dwError);
|
||||
|
||||
if (dwError == WAIT_TIMEOUT)
|
||||
|
@ -1354,7 +1354,7 @@ ScmWaitForServiceConnect(PSERVICE Service)
|
|||
DPRINT("dwError: ERROR_IO_PENDING\n");
|
||||
|
||||
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
||||
dwPipeTimeout);
|
||||
PipeTimeout);
|
||||
DPRINT("WaitForSingleObject() returned %lu\n", dwError);
|
||||
|
||||
if (dwError == WAIT_TIMEOUT)
|
||||
|
@ -1411,7 +1411,7 @@ ScmWaitForServiceConnect(PSERVICE Service)
|
|||
DPRINT("dwError: ERROR_IO_PENDING\n");
|
||||
|
||||
dwError = WaitForSingleObject(Service->lpImage->hControlPipe,
|
||||
dwPipeTimeout);
|
||||
PipeTimeout);
|
||||
if (dwError == WAIT_TIMEOUT)
|
||||
{
|
||||
DPRINT("WaitForSingleObject() returned WAIT_TIMEOUT\n");
|
||||
|
@ -1927,7 +1927,7 @@ ScmInitNamedPipeCriticalSection(VOID)
|
|||
L"ServicesPipeTimeout",
|
||||
0,
|
||||
NULL,
|
||||
(LPBYTE)&dwPipeTimeout,
|
||||
(LPBYTE)&PipeTimeout,
|
||||
&dwKeySize);
|
||||
|
||||
RegCloseKey(hKey);
|
||||
|
|
|
@ -153,7 +153,7 @@ ScmNamedPipeHandleRequest(PVOID Request,
|
|||
PVOID Reply,
|
||||
LPDWORD ReplySize)
|
||||
{
|
||||
DbgPrint("SCM READ: %s\n", Request);
|
||||
DbgPrint("SCM READ: %p\n", Request);
|
||||
|
||||
*ReplySize = 0;
|
||||
return FALSE;
|
||||
|
@ -173,7 +173,7 @@ ScmNamedPipeThread(LPVOID 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 (;;)
|
||||
{
|
||||
|
@ -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);
|
||||
DisconnectNamedPipe(hPipe);
|
||||
CloseHandle(hPipe);
|
||||
|
||||
DPRINT("ScmNamedPipeThread(%x) - Done.\n", hPipe);
|
||||
DPRINT("ScmNamedPipeThread(%lu) - Done.\n", hPipe);
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ DWORD WINAPI
|
|||
ScmNamedPipeListenerThread(LPVOID Context)
|
||||
{
|
||||
// HANDLE hPipe;
|
||||
DPRINT("ScmNamedPipeListenerThread(%x) - aka SCM.\n", Context);
|
||||
DPRINT("ScmNamedPipeListenerThread(%p) - aka SCM.\n", Context);
|
||||
|
||||
// hPipe = (HANDLE)Context;
|
||||
for (;;)
|
||||
|
@ -294,7 +294,7 @@ ScmNamedPipeListenerThread(LPVOID Context)
|
|||
DPRINT("\nSCM: named pipe session created.\n");
|
||||
Sleep(10);
|
||||
}
|
||||
DPRINT("\n\nWARNING: ScmNamedPipeListenerThread(%x) - Aborted.\n\n", Context);
|
||||
DPRINT("\n\nWARNING: ScmNamedPipeListenerThread(%p) - Aborted.\n\n", Context);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue