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
e14e6bde
Commit
e14e6bde
authored
May 22, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
May 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask: Handle disabled tasks in ITask::GetNextRunTime().
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d3a9af15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
task.c
dlls/mstask/task.c
+6
-0
task_trigger.c
dlls/mstask/tests/task_trigger.c
+13
-0
No files found.
dlls/mstask/task.c
View file @
e14e6bde
...
...
@@ -476,6 +476,12 @@ static HRESULT WINAPI MSTASK_ITask_GetNextRunTime(ITask *iface, SYSTEMTIME *rt)
TRACE
(
"(%p, %p)
\n
"
,
iface
,
rt
);
if
(
This
->
flags
&
TASK_FLAG_DISABLED
)
{
memset
(
rt
,
0
,
sizeof
(
*
rt
));
return
SCHED_S_TASK_DISABLED
;
}
GetLocalTime
(
&
current_st
);
for
(
i
=
0
;
i
<
This
->
trigger_count
;
i
++
)
...
...
dlls/mstask/tests/task_trigger.c
View file @
e14e6bde
...
...
@@ -487,6 +487,19 @@ static void test_GetNextRunTime(void)
if
(
0
)
/* crashes under Windows */
hr
=
ITask_GetNextRunTime
(
task
,
NULL
);
hr
=
ITask_SetFlags
(
task
,
TASK_FLAG_DISABLED
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
memset
(
&
st
,
0xff
,
sizeof
(
st
));
hr
=
ITask_GetNextRunTime
(
task
,
&
st
);
ok
(
hr
==
SCHED_S_TASK_DISABLED
,
"got %#x
\n
"
,
hr
);
ok
(
!
memcmp
(
&
st
,
&
st_empty
,
sizeof
(
st
)),
"got %u/%u/%u wday %u %u:%02u:%02u
\n
"
,
st
.
wDay
,
st
.
wMonth
,
st
.
wYear
,
st
.
wDayOfWeek
,
st
.
wHour
,
st
.
wMinute
,
st
.
wSecond
);
hr
=
ITask_SetFlags
(
task
,
0
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
memset
(
&
st
,
0xff
,
sizeof
(
st
));
hr
=
ITask_GetNextRunTime
(
task
,
&
st
);
ok
(
hr
==
SCHED_S_TASK_NO_VALID_TRIGGERS
,
"got %#x
\n
"
,
hr
);
...
...
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