Commit Graph

69 Commits

Author SHA1 Message Date
Alexandre Julliard 88680e522b schedsvc: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-20 09:07:53 +02:00
Detlef Riekenberg 124dbb84b5 schedsvc/tests: Avoid a crash in a SchRpcRegisterTask test.
Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 20:35:55 +01:00
Alex Henrie 63eb45083c schedsvc/tests: Check the entire entry list to find the new job.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-31 10:00:34 +02:00
Dmitry Timoshkov 4d44bc3715 schedsvc: In case it's an old Wine prefix create c:\windows\tasks automatically.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-27 16:03:40 +02:00
Dmitry Timoshkov 53266ac32d schedsvc: Use current time as trigger begin time when necessary.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-27 10:07:31 +02:00
Dmitry Timoshkov 76be2b6768 schedsvc: Avoid an infinite loop.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-27 10:07:31 +02:00
Dmitry Timoshkov f7a320e2e9 schedsvc: Minor cleanup.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-27 10:07:31 +02:00
Alexandre Julliard 6a1ce3c114 schedsvc: Only restart the directory watch once we've received data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-26 13:29:10 +02:00
Dmitry Timoshkov f637408a23 schedsvc: Retry opening a .job file only in case of sharing violation.
And turn loud ERR() into a TRACE() like it is in other places.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-12 23:48:47 +02:00
Dmitry Timoshkov 8d540ec7cf schedsvc: Add support for running missed tasks at the service start.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-11 10:50:02 +02:00
Dmitry Timoshkov ae79454989 schedsvc: Load job files at the service start up.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-11 10:50:02 +02:00
Dmitry Timoshkov 58afce6a38 schedsvc: Add a sanity check when loading a .job file.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-11 10:50:02 +02:00
Dmitry Timoshkov 70cedb3e5e schedsvc: Add support for running tasks at specified time.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-06 11:18:50 +02:00
Dmitry Timoshkov a3566fd6e1 schedsvc: Read triggers when loading a job file.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-06 11:18:44 +02:00
Francois Gouget 1bd06510e0 schedsvc: Add a trailing '\n' to some ERR() messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-01 19:42:53 +02:00
Dmitry Timoshkov 8d0444826d schedsvc: Add support for executing tasks.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-31 20:00:38 +02:00
Dmitry Timoshkov bfb0474e77 schedsvc: Read parameters and current directory from the job file.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-31 20:00:38 +02:00
Michael Stefaniuc 30d732ae40 schedsvc/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-31 09:25:23 +02:00
Dmitry Timoshkov a66c6a0968 schedsvc: Read more task fields from the job file.
Print a FIXME() when the service detects a client action.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-11 17:20:41 +02:00
Dmitry Timoshkov 0932d858aa schedsvc: Pass full task file name to remove_job()/add_job().
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-11 17:20:41 +02:00
Dmitry Timoshkov 9823191a77 schedsvc: Reimplement FILE_ACTION_MODIFIED by remove_job()/add_job() sequence as MSDN suggests.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-08 15:43:39 +02:00
Dmitry Timoshkov 7d96703016 schedsvc: Explicitly terminate the received name in the notification buffer.
And print a FIXME if we've got multiple entries.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-08 15:42:58 +02:00
Dmitry Timoshkov f7d1e16183 schedsvc: Also watch for job file modifications.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-04 11:02:02 +02:00
Dmitry Timoshkov 325f96b952 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>
2018-04-25 10:49:48 +02:00
Dmitry Timoshkov 31d2026537 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>
2018-04-25 10:49:42 +02:00
Dmitry Timoshkov 0f77a4cb82 schedsvc: Print an error if the service couldn't start monitoring the tasks directory.
This happens for old prefixes with disabled updates.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-24 10:33:09 +02:00
Dmitry Timoshkov a49f072040 schedsvc: Allow others to read the file.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-24 10:32:46 +02:00
Dmitry Timoshkov ba55cce8bc schedsvc: Implement NetrJobAdd.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-17 20:56:47 +02:00
Dmitry Timoshkov 934a64919d schedsvc: Implement NetrJobDel.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-17 20:56:47 +02:00
Dmitry Timoshkov bab40d15a0 schedsvc: Implement NetrJobEnum.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-17 20:56:47 +02:00
Dmitry Timoshkov be3f4a797f schedsvc: Implement NetrJobGetInfo.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-17 20:56:47 +02:00
Dmitry Timoshkov c85bc14d55 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>
2018-04-17 20:56:47 +02:00
Dmitry Timoshkov 2b8d47694d schedsvc: Add support for reading .job files.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-17 20:56:47 +02:00
Dmitry Timoshkov 2eb6f88670 schedsvc: Add a thread for monitoring version 1 task files.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-17 20:56:47 +02:00
Dmitry Timoshkov eacbcd725a schedsvc/tests: Add ATSvc RPC API tests.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-09 19:53:33 +02:00
Dmitry Timoshkov 10688c5f91 schedsvc: Add ATSvc server side stubs.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-09 19:53:33 +02:00
André Hentschel b164e4dc8d schedsvc/tests: Recognize newer Windows 10's RPC version.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-30 10:52:12 +02:00
Michael Stefaniuc f3b18e68a5 schedsvc: Use the global HeapAlloc() wrappers.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 09:53:26 +01:00
Nikolay Sivov f8031d0648 schedsvc: Fix xml buffer leak (Valgrind).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-13 19:39:43 +01:00
Francois Gouget e5eba4b7d1 schedsvc/tests: Add the current process id to the test summary line.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-13 19:27:59 +01:00
Sebastian Lackner be0e05604a schedsvc: Simplify and standardize the heap_xxx() declarations.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-09 20:13:24 +01:00
Francois Gouget 223ea1312b schedsvc: Simplify and standardize the heap_xxx() declarations.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-09 11:23:36 +01:00
Huw Davies bdec0b2031 schedsvc/tests: Early versions of Windows 10 return S_OK whether or not the element exists.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 11:25:29 +01:00
Sebastian Lackner bd31e320dd schedsvc: Avoid deadlock when scheduler service starts rpcss.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-02 11:27:57 +09:00
Francois Gouget d03c5b483c schedsvc/tests: Recognize Windows 10's RPC version.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-18 21:05:50 +09:00
Michael Stefaniuc b39b37c0ae schedsvc: Simplify an if-condition (PVS-Studio).
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-14 12:51:05 +09:00
Michael Stefaniuc 6f6aa9b8a6 schedsvc: Drop WINE_ prefix from ERR(). 2015-03-24 18:16:20 +09:00
Alexandre Julliard 75a2e85a27 schedsvc/tests: Don't depend on folder enumeration order. 2015-02-24 16:11:28 +09:00
Michael Stefaniuc 4d01e6f3fc schedsvc/tests: Actually test a return value (PVS-Studio). 2015-01-21 15:29:09 +01:00
Dmitry Timoshkov a484dadf4a schedsvc: Add support for generating new task name in SchRpcRegisterTask. 2014-04-10 13:54:27 +02:00