my $if_version = $interface->{VERSION};
pidl "
-static NTSTATUS $name\__op_bind(struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface, uint32_t if_version)
+static NTSTATUS $name\__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
{
#ifdef DCESRV_INTERFACE_$uname\_BIND
- return DCESRV_INTERFACE_$uname\_BIND(dce_call,iface);
+ return DCESRV_INTERFACE_$uname\_BIND(context,iface);
#else
return NT_STATUS_OK;
#endif
}
static const struct dcesrv_interface dcesrv\_$name\_interface = {
- .name = \"$name\",
- .syntax_id = {".print_uuid($uuid).",$if_version},
- .bind = $name\__op_bind,
- .unbind = $name\__op_unbind,
- .ndr_pull = $name\__op_ndr_pull,
- .dispatch = $name\__op_dispatch,
- .reply = $name\__op_reply,
- .ndr_push = $name\__op_ndr_push
+ .name = \"$name\",
+ .syntax_id = {".print_uuid($uuid).",$if_version},
+ .bind = $name\__op_bind,
+ .unbind = $name\__op_unbind,
+ .ndr_pull = $name\__op_ndr_pull,
+ .dispatch = $name\__op_dispatch,
+ .reply = $name\__op_reply,
+ .ndr_push = $name\__op_ndr_push,
+#ifdef DCESRV_INTERFACE_$uname\_FLAGS
+ .flags = DCESRV_INTERFACE_$uname\_FLAGS
+#else
+ .flags = 0
+#endif
};
";
static NTSTATUS $name\__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
{
int i;
+#ifdef DCESRV_INTERFACE_$uname\_NCACN_NP_SECONDARY_ENDPOINT
+ const char *ncacn_np_secondary_endpoint =
+ DCESRV_INTERFACE_$uname\_NCACN_NP_SECONDARY_ENDPOINT;
+#else
+ const char *ncacn_np_secondary_endpoint = NULL;
+#endif
for (i=0;i<ndr_table_$name.endpoints->count;i++) {
NTSTATUS ret;
const char *name = ndr_table_$name.endpoints->names[i];
- ret = dcesrv_interface_register(dce_ctx, name, &dcesrv_$name\_interface, NULL);
+ ret = dcesrv_interface_register(dce_ctx,
+ name,
+ ncacn_np_secondary_endpoint,
+ &dcesrv_$name\_interface,
+ NULL);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(1,(\"$name\_op_init_server: failed to register endpoint \'%s\'\\n\",name));
return ret;
return false;
}
-NTSTATUS dcerpc_server_$name\_init(void)
+NTSTATUS dcerpc_server_$name\_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
static const struct dcesrv_endpoint_server ep_server = {
my($interface) = shift;
my $count = 0;
- $res .= "NTSTATUS dcerpc_server_$interface->{NAME}\_init(void);\n";
+ $res .= "NTSTATUS dcerpc_server_$interface->{NAME}\_init(TALLOC_CTX *);\n";
$res .= "\n";
if (!defined $interface->{PROPERTIES}->{uuid}) {