Start only first service in the service table.
This commit is contained in:
parent
17e22fba88
commit
d9c9bfd779
|
@ -289,13 +289,14 @@ StartServiceCtrlDispatcherA( LPSERVICE_TABLE_ENTRYA servent )
|
||||||
|
|
||||||
if( ! read_scm_lock_data( service_name ) )
|
if( ! read_scm_lock_data( service_name ) )
|
||||||
{
|
{
|
||||||
/* FIXME: Instead of exiting we fall through and allow
|
/* FIXME: Instead of exiting we allow
|
||||||
service to be executed as ordinary program.
|
service to be executed as ordinary program.
|
||||||
This behaviour was specially introduced in the patch
|
This behaviour was specially introduced in the patch
|
||||||
submitted against revision 1.45 and so preserved here.
|
submitted against revision 1.45 and so preserved here.
|
||||||
*/
|
*/
|
||||||
FIXME("should fail with ERROR_FAILED_SERVICE_CONTROLLER_CONNECT\n");
|
FIXME("should fail with ERROR_FAILED_SERVICE_CONTROLLER_CONNECT\n");
|
||||||
goto run_service;
|
servent->lpServiceProc( 0, NULL );
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
seb = open_seb_shmem( service_name, &hServiceShmem );
|
seb = open_seb_shmem( service_name, &hServiceShmem );
|
||||||
|
@ -315,17 +316,12 @@ StartServiceCtrlDispatcherA( LPSERVICE_TABLE_ENTRYA servent )
|
||||||
for(i=0; i<dwNumServiceArgs; i++)
|
for(i=0; i<dwNumServiceArgs; i++)
|
||||||
lpArgVecA[i]=HEAP_strdupWtoA(GetProcessHeap(), 0, lpArgVecW[i]);
|
lpArgVecA[i]=HEAP_strdupWtoA(GetProcessHeap(), 0, lpArgVecW[i]);
|
||||||
|
|
||||||
run_service:
|
/* FIXME: find service entry by name if SERVICE_WIN32_SHARE_PROCESS */
|
||||||
/* FIXME: should we blindly start all services? */
|
TRACE("%s at %p)\n", debugstr_a(servent->lpServiceName),servent);
|
||||||
while (servent->lpServiceName) {
|
fpMain = servent->lpServiceProc;
|
||||||
TRACE("%s at %p)\n", debugstr_a(servent->lpServiceName),servent);
|
|
||||||
fpMain = servent->lpServiceProc;
|
|
||||||
|
|
||||||
/* try to start the service */
|
/* try to start the service */
|
||||||
fpMain( dwNumServiceArgs, lpArgVecA);
|
fpMain( dwNumServiceArgs, lpArgVecA);
|
||||||
|
|
||||||
servent++;
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if(dwNumServiceArgs)
|
if(dwNumServiceArgs)
|
||||||
|
@ -377,16 +373,12 @@ StartServiceCtrlDispatcherW( LPSERVICE_TABLE_ENTRYW servent )
|
||||||
lpServiceArgVectors[0] = service_name;
|
lpServiceArgVectors[0] = service_name;
|
||||||
dwNumServiceArgs = seb->argc + 1;
|
dwNumServiceArgs = seb->argc + 1;
|
||||||
|
|
||||||
/* FIXME: should we blindly start all services? */
|
/* FIXME: find service entry by name if SERVICE_WIN32_SHARE_PROCESS */
|
||||||
while (servent->lpServiceName) {
|
TRACE("%s at %p)\n", debugstr_w(servent->lpServiceName),servent);
|
||||||
TRACE("%s at %p)\n", debugstr_w(servent->lpServiceName),servent);
|
fpMain = servent->lpServiceProc;
|
||||||
fpMain = servent->lpServiceProc;
|
|
||||||
|
|
||||||
/* try to start the service */
|
/* try to start the service */
|
||||||
fpMain( dwNumServiceArgs, lpServiceArgVectors);
|
fpMain( dwNumServiceArgs, lpServiceArgVectors);
|
||||||
|
|
||||||
servent++;
|
|
||||||
}
|
|
||||||
|
|
||||||
HeapFree( GetProcessHeap(), 0, lpServiceArgVectors );
|
HeapFree( GetProcessHeap(), 0, lpServiceArgVectors );
|
||||||
UnmapViewOfFile( seb );
|
UnmapViewOfFile( seb );
|
||||||
|
|
Loading…
Reference in New Issue