summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-09-03 19:52:20 +0200
committerStefan Metzmacher <metze@samba.org>2010-09-04 09:01:12 +0200
commit99a26edcb37cfce19a1221f518e6c57e55120682 (patch)
treeca2fc436966ddd5c84956cbbb617059c3fd3c52a /source4/librpc/rpc
parent27918981de05edf0d07bdb4adc75701b29c957d3 (diff)
downloadsamba-99a26edcb37cfce19a1221f518e6c57e55120682.tar.gz
samba-99a26edcb37cfce19a1221f518e6c57e55120682.tar.bz2
samba-99a26edcb37cfce19a1221f518e6c57e55120682.zip
s4:librpc/rpc: implement dcerpc_bh_set_timeout()
metze
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 1163eae9f9..13e3a3e100 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -121,6 +121,23 @@ static bool dcerpc_bh_is_connected(struct dcerpc_binding_handle *h)
return true;
}
+static uint32_t dcerpc_bh_set_timeout(struct dcerpc_binding_handle *h,
+ uint32_t timeout)
+{
+ struct dcerpc_bh_state *hs = dcerpc_binding_handle_data(h,
+ struct dcerpc_bh_state);
+ uint32_t old;
+
+ if (!hs->p) {
+ return DCERPC_REQUEST_TIMEOUT;
+ }
+
+ old = hs->p->request_timeout;
+ hs->p->request_timeout = timeout;
+
+ return old;
+}
+
struct dcerpc_bh_raw_call_state {
struct dcerpc_binding_handle *h;
DATA_BLOB in_data;
@@ -456,6 +473,7 @@ static NTSTATUS dcerpc_bh_ndr_validate_out(struct dcerpc_binding_handle *h,
static const struct dcerpc_binding_handle_ops dcerpc_bh_ops = {
.name = "dcerpc",
.is_connected = dcerpc_bh_is_connected,
+ .set_timeout = dcerpc_bh_set_timeout,
.raw_call_send = dcerpc_bh_raw_call_send,
.raw_call_recv = dcerpc_bh_raw_call_recv,
.disconnect_send = dcerpc_bh_disconnect_send,