Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
31d20265
Commit
31d20265
authored
Apr 25, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
schedsvc: Fix NetrJobGetInfo return value in case of invalid job id.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
998eef6e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
atsvc.c
dlls/schedsvc/atsvc.c
+2
-1
atsvcapi.c
dlls/schedsvc/tests/atsvcapi.c
+5
-3
atsvc.idl
include/wine/atsvc.idl
+2
-0
No files found.
dlls/schedsvc/atsvc.c
View file @
31d20265
...
...
@@ -686,7 +686,7 @@ DWORD __cdecl NetrJobEnum(ATSVC_HANDLE server_name, AT_ENUM_CONTAINER *container
DWORD
__cdecl
NetrJobGetInfo
(
ATSVC_HANDLE
server_name
,
DWORD
jobid
,
AT_INFO
**
info
)
{
struct
job_t
*
job
;
DWORD
ret
=
ERROR_SUCCESS
;
DWORD
ret
=
APE_AT_ID_NOT_FOUND
;
TRACE
(
"%s,%u,%p
\n
"
,
debugstr_w
(
server_name
),
jobid
,
info
);
...
...
@@ -706,6 +706,7 @@ DWORD __cdecl NetrJobGetInfo(ATSVC_HANDLE server_name, DWORD jobid, AT_INFO **in
info_ret
->
Flags
=
job
->
info
.
Flags
;
info_ret
->
Command
=
heap_strdupW
(
job
->
info
.
Command
);
*
info
=
info_ret
;
ret
=
ERROR_SUCCESS
;
}
}
...
...
dlls/schedsvc/tests/atsvcapi.c
View file @
31d20265
...
...
@@ -58,7 +58,7 @@ START_TEST(atsvcapi)
WCHAR
server_name
[
MAX_COMPUTERNAME_LENGTH
+
1
];
PTOP_LEVEL_EXCEPTION_FILTER
old_exception_filter
;
AT_ENUM_CONTAINER
container
;
AT_INFO
info
;
AT_INFO
info
,
*
info2
;
DWORD
ret
,
i
,
total
,
start_index
,
jobid
,
try
,
try_count
;
BOOL
found
;
...
...
@@ -104,6 +104,10 @@ START_TEST(atsvcapi)
test_failures
=
1
;
test_skipped
=
0
;
info2
=
NULL
;
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
);
try_count
=
5
;
for
(
try
=
1
;
try
<=
try_count
;
try
++
)
...
...
@@ -127,8 +131,6 @@ START_TEST(atsvcapi)
for
(
i
=
0
;
i
<
container
.
EntriesRead
;
i
++
)
{
AT_INFO
*
info2
;
trace
(
"%u: jobid %u, command %s
\n
"
,
i
,
container
.
Buffer
[
i
].
JobId
,
wine_dbgstr_w
(
container
.
Buffer
[
i
].
Command
));
if
(
container
.
Buffer
[
i
].
JobId
==
jobid
||
...
...
include/wine/atsvc.idl
View file @
31d20265
...
...
@@ -29,6 +29,8 @@ import "ocidl.idl";
]
interface
atsvc
{
const
DWORD
APE_AT_ID_NOT_FOUND
=
0
x00000ede
;
typedef
[
handle
]
const
WCHAR
*
ATSVC_HANDLE
;
typedef
struct
_AT_ENUM
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment