1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

s4-irpc: Add 'timeout' param for dcesrv_irpc_forward_rpc_call() call

It is to be used when caller wants to explicitly
specify the timeout for the call
This commit is contained in:
Kamen Mazdrashki 2010-09-15 16:41:47 +03:00
parent 839ed051fc
commit ee169d7347
2 changed files with 14 additions and 6 deletions

View File

@ -57,13 +57,14 @@ static void dcesrv_irpc_forward_callback(struct tevent_req *subreq)
/*
forward a RPC call using IRPC to another task
/**
* Forward a RPC call using IRPC to another task
*/
void dcesrv_irpc_forward_rpc_call(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
void *r, uint32_t callid,
const struct ndr_interface_table *ndr_table,
const char *dest_task, const char *opname)
const char *dest_task, const char *opname,
uint32_t timeout)
{
struct dcesrv_forward_state *st;
struct dcerpc_binding_handle *binding_handle;
@ -96,6 +97,9 @@ void dcesrv_irpc_forward_rpc_call(struct dcesrv_call_state *dce_call, TALLOC_CTX
return;
}
/* reset timeout for the handle */
dcerpc_binding_handle_set_timeout(binding_handle, timeout);
/* forward the call */
subreq = dcerpc_binding_handle_call_send(st, dce_call->event_ctx,
binding_handle,

View File

@ -29,6 +29,7 @@
#include "libcli/security/security.h"
#include "auth/auth.h"
#include "param/param.h"
#include "lib/messaging/irpc.h"
#define DRSUAPI_UNSUPPORTED(fname) do { \
DEBUG(1,(__location__ ": Unsupported DRS call %s\n", #fname)); \
@ -273,7 +274,8 @@ static WERROR dcesrv_drsuapi_DsReplicaSync(struct dcesrv_call_state *dce_call, T
dcesrv_irpc_forward_rpc_call(dce_call, mem_ctx, r, NDR_DRSUAPI_DSREPLICASYNC,
&ndr_table_drsuapi,
"dreplsrv", "DsReplicaSync");
"dreplsrv", "DsReplicaSync",
IRPC_CALL_TIMEOUT);
return WERR_OK;
}
@ -751,7 +753,8 @@ static WERROR dcesrv_drsuapi_DsExecuteKCC(struct dcesrv_call_state *dce_call, TA
}
dcesrv_irpc_forward_rpc_call(dce_call, mem_ctx, r, NDR_DRSUAPI_DSEXECUTEKCC,
&ndr_table_drsuapi, "kccsrv", "DsExecuteKCC");
&ndr_table_drsuapi, "kccsrv", "DsExecuteKCC",
IRPC_CALL_TIMEOUT);
return WERR_OK;
}
@ -775,7 +778,8 @@ static WERROR dcesrv_drsuapi_DsReplicaGetInfo(struct dcesrv_call_state *dce_call
}
dcesrv_irpc_forward_rpc_call(dce_call, mem_ctx, r, NDR_DRSUAPI_DSREPLICAGETINFO,
&ndr_table_drsuapi, "kccsrv", "DsReplicaGetInfo");
&ndr_table_drsuapi, "kccsrv", "DsReplicaGetInfo",
IRPC_CALL_TIMEOUT);
return WERR_OK;
}