diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-09-15 16:53:48 +0300 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2010-09-16 00:15:38 +0300 |
commit | 7b20b795ab024fda4e159852b60d829f7ae793c7 (patch) | |
tree | 786b10856e8e410a4d7e358fd004b2360dfe8979 | |
parent | ee169d73479a5e8672d56617f2ad9cfac254f8bf (diff) | |
download | samba-7b20b795ab024fda4e159852b60d829f7ae793c7.tar.gz samba-7b20b795ab024fda4e159852b60d829f7ae793c7.tar.xz samba-7b20b795ab024fda4e159852b60d829f7ae793c7.zip |
s4-irpc: Don't install endtime-timer in case timeout is INFINITE for the call
-rw-r--r-- | source4/lib/messaging/messaging.c | 9 |
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; |