messaging3: Avoid self-send complexity
commit3a6a6f19410606a9028861ca95ac80d2651e2830
authorVolker Lendecke <vl@samba.org>
Thu, 13 Nov 2014 10:38:40 +0000 (13 10:38 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 9 Dec 2014 03:12:07 +0000 (9 04:12 +0100)
tree6fc54a2f9a6417be42119e62e5542b4b38c4eb66
parente2ee1a42cf5b57e09604792f46dd173182a014e5
messaging3: Avoid self-send complexity

With the notify code I've hit another case where self-sends caused
a problem.  This time messages were lost because we tried to do
multiple dispatch_rec calls from within a single inotify callback.
Only the first one was being taken care of, the others did not find
receivers.

This patch makes self-sends go through the kernel as well, the
kernel queues everything nicely for us. With dgram messaging this
should be pretty fast. If it turns out to be a performance problem,
we can solve it later by doing proper queueing in user space. We
need to completely decouple any processing from callbacks.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/messages.c
source3/torture/test_messaging_fd_passing.c
source3/torture/test_messaging_read.c