mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +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:
parent
839ed051fc
commit
ee169d7347
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user