s4:rpc_server: only use context within op_bind() hooks and dcesrv_interface_bind_...
[gd/samba-autobuild/.git] / source4 / rpc_server / echo / rpc_echo.c
index 4863c779f4c19fa69eaa196d40252078363d94c6..e00eaecbd456cc4072623d7bbc003a09ae4c90d7 100644 (file)
 #include "librpc/gen_ndr/ndr_echo.h"
 #include "lib/events/events.h"
 
+#define DCESRV_INTERFACE_RPCECHO_BIND(call, iface) \
+       dcesrv_interface_rpcecho_bind(call, iface)
+static NTSTATUS dcesrv_interface_rpcecho_bind(struct dcesrv_call_state *dce_call,
+                                             const struct dcesrv_interface *iface)
+{
+       struct dcesrv_connection_context *context = dce_call->context;
+       return dcesrv_interface_bind_allow_connect(context, iface);
+}
 
 static NTSTATUS dcesrv_echo_AddOne(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct echo_AddOne *r)
 {