summaryrefslogtreecommitdiff
path: root/source4/lib/messaging
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/messaging')
-rw-r--r--source4/lib/messaging/messaging.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index a0aabbbc21..e78ec83b4b 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -250,14 +250,15 @@ void messaging_register(void *ctx, void *private,
/*
De-register the function for a particular message type.
*/
-void messaging_deregister(void *ctx, uint32_t msg_type)
+void messaging_deregister(void *ctx, uint32_t msg_type, void *private)
{
struct messaging_state *msg = ctx;
struct dispatch_fn *d, *next;
for (d = msg->dispatch; d; d = next) {
next = d->next;
- if (d->msg_type == msg_type) {
+ if (d->msg_type == msg_type &&
+ d->private == private) {
DLIST_REMOVE(msg->dispatch, d);
talloc_free(d);
}