advapi32: Fix the service function being called when extended is
either set or not set (reported by Andrey Turkin).
This commit is contained in:
parent
85ed9a5905
commit
cc5aceb4f0
|
@ -610,16 +610,16 @@ static BOOL service_handle_control(HANDLE pipe, service_data *service,
|
||||||
|
|
||||||
if (service_accepts_control(service, dwControl))
|
if (service_accepts_control(service, dwControl))
|
||||||
{
|
{
|
||||||
if (service->extended && service->handler.handler)
|
if (service->extended && service->handler.handler_ex)
|
||||||
{
|
|
||||||
service->handler.handler(dwControl);
|
|
||||||
ret = ERROR_SUCCESS;
|
|
||||||
}
|
|
||||||
else if (service->handler.handler_ex)
|
|
||||||
{
|
{
|
||||||
service->handler.handler_ex(dwControl, 0, NULL, service->context);
|
service->handler.handler_ex(dwControl, 0, NULL, service->context);
|
||||||
ret = ERROR_SUCCESS;
|
ret = ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
else if (service->handler.handler)
|
||||||
|
{
|
||||||
|
service->handler.handler(dwControl);
|
||||||
|
ret = ERROR_SUCCESS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return WriteFile(pipe, &ret, sizeof ret, &count, NULL);
|
return WriteFile(pipe, &ret, sizeof ret, &count, NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue