summaryrefslogtreecommitdiff
path: root/source4/lib/messaging
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-09-15 16:53:48 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-09-16 00:15:38 +0300
commit7b20b795ab024fda4e159852b60d829f7ae793c7 (patch)
tree786b10856e8e410a4d7e358fd004b2360dfe8979 /source4/lib/messaging
parentee169d73479a5e8672d56617f2ad9cfac254f8bf (diff)
downloadsamba-7b20b795ab024fda4e159852b60d829f7ae793c7.tar.gz
samba-7b20b795ab024fda4e159852b60d829f7ae793c7.tar.bz2
samba-7b20b795ab024fda4e159852b60d829f7ae793c7.zip
s4-irpc: Don't install endtime-timer in case timeout is INFINITE for the call
Diffstat (limited to 'source4/lib/messaging')
-rw-r--r--source4/lib/messaging/messaging.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index c33db825fc..d880c6336f 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -1139,9 +1139,12 @@ static struct tevent_req *irpc_bh_raw_call_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
- ok = tevent_req_set_endtime(req, ev, timeval_current_ofs(hs->timeout, 0));
- if (!ok) {
- return tevent_req_post(req, ev);
+ if (hs->timeout != IRPC_CALL_TIMEOUT_INF) {
+ /* set timeout-callback in case caller wants that */
+ ok = tevent_req_set_endtime(req, ev, timeval_current_ofs(hs->timeout, 0));
+ if (!ok) {
+ return tevent_req_post(req, ev);
+ }
}
return req;