schedsvc: Fix NetrJobDel return value in case of invalid job id.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2018-04-25 11:29:50 +08:00 committed by Alexandre Julliard
parent 31d2026537
commit 325f96b952
2 changed files with 5 additions and 2 deletions

View File

@ -589,7 +589,7 @@ DWORD __cdecl NetrJobAdd(ATSVC_HANDLE server_name, AT_INFO *info, DWORD *jobid)
DWORD __cdecl NetrJobDel(ATSVC_HANDLE server_name, DWORD min_jobid, DWORD max_jobid)
{
DWORD jobid, ret = ERROR_FILE_NOT_FOUND;
DWORD jobid, ret = APE_AT_ID_NOT_FOUND;
TRACE("%s,%u,%u\n", debugstr_w(server_name), min_jobid, max_jobid);
@ -602,7 +602,7 @@ DWORD __cdecl NetrJobDel(ATSVC_HANDLE server_name, DWORD min_jobid, DWORD max_jo
if (!job)
{
TRACE("job %u not found\n", jobid);
ret = ERROR_FILE_NOT_FOUND;
ret = APE_AT_ID_NOT_FOUND;
break;
}

View File

@ -108,6 +108,9 @@ START_TEST(atsvcapi)
ret = NetrJobGetInfo(server_name, 0xdeadbeef, &info2);
ok(ret == APE_AT_ID_NOT_FOUND || broken(1) /* vista and w2008 return rubbish here */, "wrong error %u\n", ret);
ret = NetrJobDel(server_name, 0xdeadbeef, 0xdeadbeef);
ok(ret == APE_AT_ID_NOT_FOUND, "wrong error %u\n", ret);
try_count = 5;
for (try = 1; try <= try_count; try++)