Fix some little bugs

svn path=/trunk/; revision=22191
This commit is contained in:
Hervé Poussineau 2006-06-03 11:47:04 +00:00
parent 97b1971025
commit 21d98cbddd
4 changed files with 16 additions and 15 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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;
}

View file

@ -121,7 +121,7 @@ VOID ScmStartRpcServer(VOID);
/* services.c */
VOID PrintString(LPCSTR fmt, ...);
NTSTATUS ScmStartService(PSERVICE Service);
/* EOF */