From 21d98cbddd8a04fa13b77bf0ac046c8a37c1dced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 3 Jun 2006 11:47:04 +0000 Subject: [PATCH] Fix some little bugs svn path=/trunk/; revision=22191 --- reactos/base/system/services/database.c | 18 +++++++----------- reactos/base/system/services/groupdb.c | 1 + reactos/base/system/services/rpcserver.c | 10 +++++++--- reactos/base/system/services/services.h | 2 +- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/reactos/base/system/services/database.c b/reactos/base/system/services/database.c index 1ce5f359fdf..3a4ab916c33 100644 --- a/reactos/base/system/services/database.c +++ b/reactos/base/system/services/database.c @@ -741,10 +741,10 @@ ScmStartUserModeService(PSERVICE Service) } -static NTSTATUS -ScmStartService(PSERVICE Service, - PSERVICE_GROUP Group) +NTSTATUS +ScmStartService(PSERVICE Service) { + PSERVICE_GROUP Group = Service->lpGroup; NTSTATUS Status; DPRINT("ScmStartService() called\n"); @@ -849,8 +849,7 @@ ScmAutoStartServices(VOID) (CurrentService->dwTag == CurrentGroup->TagArray[i])) { CurrentService->ServiceVisited = TRUE; - ScmStartService(CurrentService, - CurrentGroup); + ScmStartService(CurrentService); } ServiceEntry = ServiceEntry->Flink; @@ -868,8 +867,7 @@ ScmAutoStartServices(VOID) (CurrentService->ServiceVisited == FALSE)) { CurrentService->ServiceVisited = TRUE; - ScmStartService(CurrentService, - CurrentGroup); + ScmStartService(CurrentService); } ServiceEntry = ServiceEntry->Flink; @@ -889,8 +887,7 @@ ScmAutoStartServices(VOID) (CurrentService->ServiceVisited == FALSE)) { CurrentService->ServiceVisited = TRUE; - ScmStartService(CurrentService, - NULL); + ScmStartService(CurrentService); } ServiceEntry = ServiceEntry->Flink; @@ -907,8 +904,7 @@ ScmAutoStartServices(VOID) (CurrentService->ServiceVisited == FALSE)) { CurrentService->ServiceVisited = TRUE; - ScmStartService(CurrentService, - NULL); + ScmStartService(CurrentService); } ServiceEntry = ServiceEntry->Flink; diff --git a/reactos/base/system/services/groupdb.c b/reactos/base/system/services/groupdb.c index 2f50981dad6..b332941b424 100644 --- a/reactos/base/system/services/groupdb.c +++ b/reactos/base/system/services/groupdb.c @@ -63,6 +63,7 @@ ScmSetServiceGroup(PSERVICE lpService, wcscpy(lpGroup->szGroupName, lpGroupName); lpGroup->lpGroupName = lpGroup->szGroupName; lpGroup->dwRefCount = 1; + lpService->lpGroup = lpGroup; InsertTailList(&UnknownGroupListHead, &lpGroup->GroupListEntry); diff --git a/reactos/base/system/services/rpcserver.c b/reactos/base/system/services/rpcserver.c index d8e2245ba4d..b71f482726b 100644 --- a/reactos/base/system/services/rpcserver.c +++ b/reactos/base/system/services/rpcserver.c @@ -1605,7 +1605,7 @@ ScmrQueryServiceConfigW(handle_t BindingHandle, LPQUERY_SERVICE_CONFIGW lpConfig; LPWSTR lpStr; - DPRINT1("ScmrQueryServiceConfigW() called\n"); + DPRINT("ScmrQueryServiceConfigW() called\n"); if (ScmShutdown) return ERROR_SHUTDOWN_IN_PROGRESS; @@ -1725,7 +1725,7 @@ Done:; /* FIXME: Unlock the service database */ - DPRINT1("ScmrQueryServiceConfigW() done\n"); + DPRINT("ScmrQueryServiceConfigW() done\n"); return dwError; } @@ -1755,6 +1755,7 @@ ScmrStartServiceW(handle_t BindingHandle, DWORD dwError = ERROR_SUCCESS; PSERVICE_HANDLE hSvc; PSERVICE lpService = NULL; + NTSTATUS Status; DPRINT1("ScmrStartServiceW() called\n"); @@ -1788,7 +1789,10 @@ ScmrStartServiceW(handle_t BindingHandle, if (lpService->bDeleted) return ERROR_SERVICE_MARKED_FOR_DELETE; - /* FIXME: Start the service */ + /* Start the service */ + Status = STATUS_SUCCESS; /* FIXME: ScmStartService(lpService); */ + if (!NT_SUCCESS(Status)) + return RtlNtStatusToDosError(Status); return dwError; } diff --git a/reactos/base/system/services/services.h b/reactos/base/system/services/services.h index 5c72fcf4745..5e8e96fc2d2 100644 --- a/reactos/base/system/services/services.h +++ b/reactos/base/system/services/services.h @@ -121,7 +121,7 @@ VOID ScmStartRpcServer(VOID); /* services.c */ VOID PrintString(LPCSTR fmt, ...); - +NTSTATUS ScmStartService(PSERVICE Service); /* EOF */