spoolssd: Use only one messaging_context per process
authorVolker Lendecke <vl@samba.org>
Tue, 18 Feb 2014 19:51:43 +0000 (20:51 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 20 Feb 2014 00:38:30 +0000 (16:38 -0800)
After the fork, the code created a fresh messaging_context before doing the
reinit_after_fork. This means to have two initialized messaging contexts in
that process. This patch aligns spoolssd with lsad.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/printing/spoolssd.c

index 0b6980a9733c71c4a63c07f6b78ddd5a83137cf3..1bf87b30ead475a86e79f9b2915f588c637c1363 100644 (file)
@@ -285,7 +285,7 @@ static bool spoolss_child_init(struct tevent_context *ev_ctx,
 {
        NTSTATUS status;
        struct rpc_srv_callbacks spoolss_cb;
-       struct messaging_context *msg_ctx = messaging_init(NULL, ev_ctx);
+       struct messaging_context *msg_ctx = server_messaging_context();
        bool ok;
 
        status = reinit_after_fork(msg_ctx, ev_ctx,