advapi32: Fix the service function being called when extended is

either set or not set (reported by Andrey Turkin).
This commit is contained in:
Robert Shearman 2006-07-03 13:49:10 +01:00 committed by Alexandre Julliard
parent 85ed9a5905
commit cc5aceb4f0
1 changed files with 6 additions and 6 deletions

View File

@ -610,16 +610,16 @@ static BOOL service_handle_control(HANDLE pipe, service_data *service,
if (service_accepts_control(service, dwControl))
{
if (service->extended && service->handler.handler)
{
service->handler.handler(dwControl);
ret = ERROR_SUCCESS;
}
else if (service->handler.handler_ex)
if (service->extended && service->handler.handler_ex)
{
service->handler.handler_ex(dwControl, 0, NULL, service->context);
ret = ERROR_SUCCESS;
}
else if (service->handler.handler)
{
service->handler.handler(dwControl);
ret = ERROR_SUCCESS;
}
}
return WriteFile(pipe, &ret, sizeof ret, &count, NULL);
}