messaging: With dgm_ref, don't destroy the dgm ctx
authorVolker Lendecke <vl@samba.org>
Fri, 22 May 2015 16:40:25 +0000 (18:40 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 28 May 2015 09:13:09 +0000 (11:13 +0200)
Since we use messaging_dgm_ref, we must rely on that to destroy the dgm
context when the last reference goes.

This is a real bugfix in case we have multiple messaging contexts.

I'm not sure if we should move towards just one single messaging context
per process, just like we have it for the dgm context.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/lib/messages.c

index 51e88e264192d19ac2971d3c8f5eb3a93b8e4acc..6cc5275e9e69ada9e46e61ff4408c9b3f57d4f98 100644 (file)
@@ -264,8 +264,6 @@ static int messaging_context_destructor(struct messaging_context *ctx)
 {
        unsigned i;
 
-       messaging_dgm_destroy();
-
        for (i=0; i<ctx->num_new_waiters; i++) {
                if (ctx->new_waiters[i] != NULL) {
                        tevent_req_set_cleanup_fn(ctx->new_waiters[i], NULL);