summaryrefslogtreecommitdiffstats
path: root/source3/wscript_build
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-04-29 14:14:24 +0200
committerVolker Lendecke <vl@samba.org>2014-04-30 14:52:08 +0200
commitd0590eec7e12f2a5ddb9f76365d5547cc3c668c1 (patch)
tree62781f2fcdc1308675db3e1c02fd373a8c9492d2 /source3/wscript_build
parent8117dcd5fb9ecda8ce85c064f0ceb4fda29c8e6f (diff)
downloadsamba-d0590eec7e12f2a5ddb9f76365d5547cc3c668c1.tar.gz
samba-d0590eec7e12f2a5ddb9f76365d5547cc3c668c1.tar.xz
samba-d0590eec7e12f2a5ddb9f76365d5547cc3c668c1.zip
messaging3: Fix messaging_read_send/recv
messaging_read_send/recv was okay for just one handler in the queue. For multiple handlers it was pretty broken. A handler that deletes itself as part of the callback (pretty typical use case...) drops the message for a subsequent handler that responds to the same message type. In messaging_dispatch_rec we walk the array, however messaging_read_cleanup has already changed the array. tevent_req_defer_callback does not help here: It only defers the callback, it does not defer the cleanup function. This also happens when a callback deletes a different handler A handler that re-installs itself in the callback might get a message twice. This patch changes the code such that only messaging_dispatch_rec adds records to msg_ctx->waiters, new waiters are put into a staging area first (msg_ctx->new_waiters). Also messaging_read_cleanup does not move anything around in msg_ctx->waiters, it only nulls out itself. messaging_dispatch_rec is changed to cope with this. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/wscript_build')
0 files changed, 0 insertions, 0 deletions