mirror of
https://github.com/reactos/reactos.git
synced 2025-06-05 09:20:30 +00:00
[SERVICES]
Improve a check in RQueryServiceConfig2W and RQueryServiceConfig2A Patch by Hermès Bélusca. See issue #7123 for more details. svn path=/trunk/; revision=56739
This commit is contained in:
parent
bb5ffbd494
commit
25dcec8bf3
1 changed files with 12 additions and 4 deletions
|
@ -5268,7 +5268,7 @@ DWORD RQueryServiceConfig2A(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now we can fill the buffer */
|
/* Now we can fill the buffer */
|
||||||
if (dwType == REG_BINARY)
|
if (dwError != ERROR_FILE_NOT_FOUND && dwType == REG_BINARY)
|
||||||
{
|
{
|
||||||
dwError = RegQueryValueExW(hServiceKey,
|
dwError = RegQueryValueExW(hServiceKey,
|
||||||
L"FailureActions",
|
L"FailureActions",
|
||||||
|
@ -5284,7 +5284,11 @@ DWORD RQueryServiceConfig2A(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dwError = ERROR_UNSUPPORTED_TYPE;
|
/*
|
||||||
|
* The value of the error doesn't really matter, the only
|
||||||
|
* important thing is that it must be != ERROR_SUCCESS .
|
||||||
|
*/
|
||||||
|
dwError = ERROR_INVALID_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dwError == ERROR_SUCCESS)
|
if (dwError == ERROR_SUCCESS)
|
||||||
|
@ -5492,7 +5496,7 @@ DWORD RQueryServiceConfig2W(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now we can fill the buffer */
|
/* Now we can fill the buffer */
|
||||||
if (dwType == REG_BINARY)
|
if (dwError != ERROR_FILE_NOT_FOUND && dwType == REG_BINARY)
|
||||||
{
|
{
|
||||||
dwError = RegQueryValueExW(hServiceKey,
|
dwError = RegQueryValueExW(hServiceKey,
|
||||||
L"FailureActions",
|
L"FailureActions",
|
||||||
|
@ -5508,7 +5512,11 @@ DWORD RQueryServiceConfig2W(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dwError = ERROR_UNSUPPORTED_TYPE;
|
/*
|
||||||
|
* The value of the error doesn't really matter, the only
|
||||||
|
* important thing is that it must be != ERROR_SUCCESS .
|
||||||
|
*/
|
||||||
|
dwError = ERROR_INVALID_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dwError == ERROR_SUCCESS)
|
if (dwError == ERROR_SUCCESS)
|
||||||
|
|
Loading…
Reference in a new issue