summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-03-21 11:39:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:59:02 -0500
commit580e5a1a26f9e2ec2881fef2476f9ff2d26df814 (patch)
tree55fbbfffa984b5d29f03f27a5b1abcfc2461da46 /source4
parent582c039ab14d79501362761811197477752372a9 (diff)
downloadsamba-580e5a1a26f9e2ec2881fef2476f9ff2d26df814.tar.gz
samba-580e5a1a26f9e2ec2881fef2476f9ff2d26df814.tar.bz2
samba-580e5a1a26f9e2ec2881fef2476f9ff2d26df814.zip
r14614: handle zero timers in pvfs_wait()
(This used to be commit cc1f8b3ebe2dcab6f21913af9baf231f3250120e)
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/posix/pvfs_wait.c8
1 files 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 */