summaryrefslogtreecommitdiff
path: root/source3/lib/messages.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-12-08 17:18:33 +0100
committerJeremy Allison <jra@samba.org>2017-12-12 20:37:08 +0100
commita3a4d9ccc09181885ef0b01db5fc5d306c8c7bf4 (patch)
treeca9a356497999b7f343e2e68d4c2200688c72186 /source3/lib/messages.c
parent70f92025ae504cda97ff3a130f19035450967836 (diff)
downloadsamba-a3a4d9ccc09181885ef0b01db5fc5d306c8c7bf4.tar.gz
messaging: Don't do self-sends in messaging_send_all
This leads to cleanupd doing endless MSG_SMB_UNLOCK calls, as it triggers itself in the send_all. This worked correctly before the serverid.tdb removal because cleanupd did not register in serverid.tdb (which was a bug, but it helped us there). Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/lib/messages.c')
-rw-r--r--source3/lib/messages.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index a0a3f9fb1ba..561616df6e4 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -857,6 +857,11 @@ static int send_all_fn(pid_t pid, void *private_data)
struct send_all_state *state = private_data;
NTSTATUS status;
+ if (pid == getpid()) {
+ DBG_DEBUG("Skip ourselves in messaging_send_all\n");
+ return 0;
+ }
+
status = messaging_send_buf(state->msg_ctx, pid_to_procid(pid),
state->msg_type, state->buf, state->len);
if (!NT_STATUS_IS_OK(status)) {