Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8587b478
Commit
8587b478
authored
May 24, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
May 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask: Keep the job file uuid across load/save operations.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f9f7b775
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
task.c
dlls/mstask/task.c
+10
-1
No files found.
dlls/mstask/task.c
View file @
8587b478
...
...
@@ -58,6 +58,7 @@ typedef struct
LONG
ref
;
ITaskDefinition
*
task
;
IExecAction
*
action
;
UUID
uuid
;
LPWSTR
task_name
;
HRESULT
status
;
WORD
idle_minutes
,
deadline_minutes
;
...
...
@@ -1241,6 +1242,8 @@ static HRESULT load_job_data(TaskImpl *This, BYTE *data, DWORD size)
if
(
fixed
->
file_version
!=
0x0001
)
return
SCHED_E_INVALID_TASK
;
This
->
uuid
=
fixed
->
uuid
;
TRACE
(
"name_size_offset %04x
\n
"
,
fixed
->
name_size_offset
);
TRACE
(
"trigger_offset %04x
\n
"
,
fixed
->
trigger_offset
);
TRACE
(
"error_retry_count %u
\n
"
,
fixed
->
error_retry_count
);
...
...
@@ -1583,7 +1586,6 @@ static HRESULT WINAPI MSTASK_IPersistFile_Save(IPersistFile *iface, LPCOLESTR ta
ver
=
GetVersion
();
fixed
.
product_version
=
MAKEWORD
(
ver
>>
8
,
ver
);
fixed
.
file_version
=
0x0001
;
CoCreateGuid
(
&
fixed
.
uuid
);
fixed
.
name_size_offset
=
sizeof
(
fixed
)
+
sizeof
(
USHORT
);
/* FIXDLEN_DATA + Instance Count */
fixed
.
trigger_offset
=
sizeof
(
fixed
)
+
sizeof
(
USHORT
);
/* FIXDLEN_DATA + Instance Count */
fixed
.
trigger_offset
+=
sizeof
(
USHORT
);
/* Application Name */
...
...
@@ -1627,6 +1629,11 @@ static HRESULT WINAPI MSTASK_IPersistFile_Save(IPersistFile *iface, LPCOLESTR ta
Sleep
(
100
);
}
if
(
GetLastError
()
==
ERROR_ALREADY_EXISTS
)
fixed
.
uuid
=
This
->
uuid
;
else
CoCreateGuid
(
&
fixed
.
uuid
);
if
(
!
WriteFile
(
hfile
,
&
fixed
,
sizeof
(
fixed
),
&
size
,
NULL
))
{
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
...
...
@@ -1848,6 +1855,8 @@ HRESULT TaskConstructor(ITaskService *service, const WCHAR *name, ITask **task)
This
->
is_dirty
=
FALSE
;
This
->
instance_count
=
0
;
CoCreateGuid
(
&
This
->
uuid
);
/* Default time is 3 days = 259200000 ms */
This
->
maxRunTime
=
259200000
;
...
...
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