summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorSamuel Cabrero <scabrero@samba.org>2019-09-06 15:16:01 +0200
committerAndrew Bartlett <abartlet@samba.org>2019-12-12 00:35:31 +0000
commite24ce0023fa00a33d22f5f475e9280a8cad612c3 (patch)
tree0a026da32c67e7bac19789231a5f3a00969eec76 /pidl
parent79af978c815e6ad94797742c8755f4fe8142160e (diff)
downloadsamba-e24ce0023fa00a33d22f5f475e9280a8cad612c3.tar.gz
pidl:NDR/Server: Allow to define endpoint server shutdown functions
The next commits will register legacy api_struct when the endpoint server is initialized. This commit adds a shutdown function which will be used to unregister the legacy api_struct. The shutdown function will be also used to replace the rpc_srv_callbacks struct shutdown member used, for example, by the spoolss service to cleanup before exiting. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
index 68479893116..eed7d799c0e 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
@@ -240,6 +240,11 @@ static NTSTATUS $name\__op_init_server(struct dcesrv_context *dce_ctx, const str
return NT_STATUS_OK;
}
+static NTSTATUS $name\__op_shutdown_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
+{
+ return NT_STATUS_OK;
+}
+
static bool $name\__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
{
if (dcesrv_$name\_interface.syntax_id.if_version == if_version &&
@@ -277,6 +282,11 @@ NTSTATUS dcerpc_server_$name\_init(TALLOC_CTX *ctx)
#else
.init_server = $name\__op_init_server,
#endif
+#ifdef DCESRV_INTERFACE_$uname\_SHUTDOWN_SERVER
+ .shutdown_server = DCESRV_INTERFACE_$uname\_SHUTDOWN_SERVER,
+#else
+ .shutdown_server = $name\__op_shutdown_server,
+#endif
.interface_by_uuid = $name\__op_interface_by_uuid,
.interface_by_name = $name\__op_interface_by_name
};