Tue Sep 25 01:20:18 2012: Request 79840 was acted upon.
Transaction: Ticket created by http://hellosam.net/
Queue: Win32-Daemon
Subject: CreateService cannot handle more than one dependencies specified
Broken in: 20110117
Severity: Important
Owner: Nobody
Requestors: [email protected]
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=79840 >
Repro step:
1. Win32::Daemon::CreateService({
dependencies => [qw(AFD RPCSS Tcpip)],
...});
2. Check the service created, dependency settings is not correct.
To be exact, the unfolding code is wrong (same problem in
ConfigureService also):
for( DWORD dwIndex = 0; dwIndex < dwCount; dwIndex++ )
{
_tcscpy( pszBuffer, ARRAY_GET_PV( pAv, dwIndex ) );
// _tcslen(pszBuffer) does not consider the string already in
szDependencies
// Prehaps more correct to say &pszBuffer[_tcslen( pszBuffer
)+1]
pszBuffer = &szDependencies[ _tcslen( pszBuffer ) + 1 ];
}