From 4691b190f586025957d306f25de2c3f9af881857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 8 Mar 2013 20:56:18 +0000 Subject: [PATCH] [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 --- reactos/base/system/services/database.c | 22 +++++++++++----------- reactos/base/system/services/services.c | 12 ++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/reactos/base/system/services/database.c b/reactos/base/system/services/database.c index 989c41ef41e..0c2a50d5e81 100644 --- a/reactos/base/system/services/database.c +++ b/reactos/base/system/services/database.c @@ -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); diff --git a/reactos/base/system/services/services.c b/reactos/base/system/services/services.c index c24bc22a279..56c3f04a719 100644 --- a/reactos/base/system/services/services.c +++ b/reactos/base/system/services/services.c @@ -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; }