From 580e5a1a26f9e2ec2881fef2476f9ff2d26df814 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 21 Mar 2006 11:39:48 +0000 Subject: r14614: handle zero timers in pvfs_wait() (This used to be commit cc1f8b3ebe2dcab6f21913af9baf231f3250120e) --- source4/ntvfs/posix/pvfs_wait.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c index 6cb24e1f92..2d7e41c247 100644 --- a/source4/ntvfs/posix/pvfs_wait.c +++ b/source4/ntvfs/posix/pvfs_wait.c @@ -33,7 +33,6 @@ struct pvfs_wait { struct pvfs_state *pvfs; void (*handler)(void *, enum pvfs_wait_notice); void *private; - struct timed_event *te; int msg_type; struct messaging_context *msg_ctx; struct event_context *ev; @@ -140,9 +139,10 @@ void *pvfs_wait_message(struct pvfs_state *pvfs, pwait->req = talloc_reference(pwait, req); pwait->pvfs = pvfs; - /* setup a timer */ - pwait->te = event_add_timed(pwait->ev, pwait, end_time, - pvfs_wait_timeout, pwait); + if (!timeval_is_zero(&end_time)) { + /* setup a timer */ + event_add_timed(pwait->ev, pwait, end_time, pvfs_wait_timeout, pwait); + } /* register with the messaging subsystem for this message type */ -- cgit