fixed a bug in message handling for code the change notify code
commite8c1a7eba2ff153defcf5e5dd89db251634ea973
authorAndrew Tridgell <tridge@samba.org>
Tue, 10 Mar 2009 05:45:45 +0000 (10 16:45 +1100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 27 Mar 2009 12:06:53 +0000 (27 13:06 +0100)
tree72718a54525d9943eb1eef44498d19c9591edfce
parente6b8b7e442f32a73ca87436617f0d63014cc5ade
fixed a bug in message handling for code the change notify code

The change notify code registered a separate message handler for each
tree connect. This registration uses the global messaging context.

The messaging code would consider a 2nd registration for the same
messaging type as being an 'update' of the handler, rather than a new
handler. It also would only call the first handler in the linked list
for a given message type when dispatching messages.

This patch changes the messaging code to allow for multiple
registrations of the same message type, and allow for multiple calls
to different messaging handler for one incoming message.

This fixes the problem with the test_notify_tcon() test that I
recently committed to the S4 smbtorture
(cherry picked from commit 89e340e09fbdc375c0aa85506add525b8ba5dcd0)
(cherry picked from commit 733881d22f9864ea371b29d7d1817fb4af6b865c)
source/lib/messages.c