Piotr Caban : server: Don't create wait object if infinite timeout is passed to NtSetTimer.
Alexandre Julliard
julliard at winehq.org
Mon Sep 21 15:12:15 CDT 2020
Module: wine
Branch: master
Commit: b67bbb732be82dedee93c88cf92c92c0540f3514
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b67bbb732be82dedee93c88cf92c92c0540f3514
Author: Piotr Caban <piotr at codeweavers.com>
Date: Sun Sep 20 15:58:54 2020 +0200
server: Don't create wait object if infinite timeout is passed to NtSetTimer.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49847
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
server/timer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/timer.c b/server/timer.c
index 6460acbf51..469f9d5a90 100644
--- a/server/timer.c
+++ b/server/timer.c
@@ -177,7 +177,8 @@ static int set_timer( struct timer *timer, timeout_t expire, unsigned int period
timer->callback = callback;
timer->arg = arg;
if (callback) timer->thread = (struct thread *)grab_object( current );
- timer->timeout = add_timeout_user( expire, timer_callback, timer );
+ if (expire != TIMEOUT_INFINITE)
+ timer->timeout = add_timeout_user( expire, timer_callback, timer );
return signaled;
}
More information about the wine-cvs
mailing list