Example #1
0
static NTSTATUS w32time__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
{
	int i;

	for (i=0;i<ndr_table_w32time.endpoints->count;i++) {
		NTSTATUS ret;
		const char *name = ndr_table_w32time.endpoints->names[i];

		ret = dcesrv_interface_register(dce_ctx, name, &dcesrv_w32time_interface, NULL);
		if (!NT_STATUS_IS_OK(ret)) {
			DEBUG(1,("w32time_op_init_server: failed to register endpoint '%s'\n",name));
			return ret;
		}
	}

	return NT_STATUS_OK;
}
Example #2
0
static NTSTATUS remote_register_one_iface(struct dcesrv_context *dce_ctx, const struct dcesrv_interface *iface)
{
	unsigned int i;
	const struct ndr_interface_table *table = iface->private_data;

	for (i=0;i<table->endpoints->count;i++) {
		NTSTATUS ret;
		const char *name = table->endpoints->names[i];

		ret = dcesrv_interface_register(dce_ctx, name, iface, NULL);
		if (!NT_STATUS_IS_OK(ret)) {
			DEBUG(1,("remote_op_init_server: failed to register endpoint '%s'\n",name));
			return ret;
		}
	}

	return NT_STATUS_OK;
}