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
c85bc14d
Commit
c85bc14d
authored
Apr 17, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
schedsvc: Remove job from the list when job file is deleted.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2b8d4769
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
atsvc.c
dlls/schedsvc/atsvc.c
+28
-0
schedsvc_private.h
dlls/schedsvc/schedsvc_private.h
+1
-0
svc_main.c
dlls/schedsvc/svc_main.c
+8
-0
No files found.
dlls/schedsvc/atsvc.c
View file @
c85bc14d
...
...
@@ -327,6 +327,34 @@ void add_job(const WCHAR *name)
}
}
static
struct
job_t
*
find_job
(
DWORD
jobid
,
const
WCHAR
*
name
)
{
struct
job_t
*
job
;
LIST_FOR_EACH_ENTRY
(
job
,
&
at_job_list
,
struct
job_t
,
entry
)
{
if
((
name
&&
!
lstrcmpiW
(
job
->
name
,
name
))
||
job
->
info
.
JobId
==
jobid
)
return
job
;
}
return
NULL
;
}
void
remove_job
(
const
WCHAR
*
name
)
{
struct
job_t
*
job
;
EnterCriticalSection
(
&
at_job_list_section
);
job
=
find_job
(
0
,
name
);
if
(
job
)
{
list_remove
(
&
job
->
entry
);
heap_free
(
job
->
name
);
heap_free
(
job
);
}
LeaveCriticalSection
(
&
at_job_list_section
);
}
DWORD
__cdecl
NetrJobAdd
(
ATSVC_HANDLE
server_name
,
AT_INFO
*
info
,
DWORD
*
jobid
)
{
FIXME
(
"%s,%p,%p: stub
\n
"
,
debugstr_w
(
server_name
),
info
,
jobid
);
...
...
dlls/schedsvc/schedsvc_private.h
View file @
c85bc14d
...
...
@@ -24,6 +24,7 @@
void
schedsvc_auto_start
(
void
)
DECLSPEC_HIDDEN
;
void
add_job
(
const
WCHAR
*
name
)
DECLSPEC_HIDDEN
;
void
remove_job
(
const
WCHAR
*
name
)
DECLSPEC_HIDDEN
;
static
inline
WCHAR
*
heap_strdupW
(
const
WCHAR
*
src
)
{
...
...
dlls/schedsvc/svc_main.c
View file @
c85bc14d
...
...
@@ -91,6 +91,14 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
add_job
(
path
);
break
;
case
FILE_ACTION_REMOVED
:
TRACE
(
"FILE_ACTION_REMOVED %s
\n
"
,
debugstr_w
(
info
.
data
.
FileName
));
GetWindowsDirectoryW
(
path
,
MAX_PATH
);
lstrcatW
(
path
,
tasksW
);
lstrcatW
(
path
,
info
.
data
.
FileName
);
remove_job
(
path
);
break
;
default:
FIXME
(
"%s: action %#x not handled
\n
"
,
debugstr_w
(
info
.
data
.
FileName
),
info
.
data
.
Action
);
break
;
...
...
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