summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-12-14 22:11:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:29 -0500
commit806daad51088bddcedda0274333b3f9e17cc26b3 (patch)
tree8f392296a4e2f26bb4ade1bc076f5a92ca0365a9 /source3
parentdb7bf9a6b6754b604ee44d28c564bab10c7b98a7 (diff)
downloadsamba-806daad51088bddcedda0274333b3f9e17cc26b3.tar.gz
samba-806daad51088bddcedda0274333b3f9e17cc26b3.tar.bz2
samba-806daad51088bddcedda0274333b3f9e17cc26b3.zip
r20174: If we're only going to call one handler per message
then terminate the traversal once we've done that. Jeremy. (This used to be commit da3d0b62340b545950ea2081f30c252fd4609981)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/messages.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 66bbebac27..de17a03afc 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -483,23 +483,23 @@ void message_dispatch(void)
return;
for (buf = msgs_buf; message_recv(msgs_buf, total_len, &msg_type, &src, &buf, &len); buf += len) {
- struct dispatch_fns *dfn, *next;
+ struct dispatch_fns *dfn;
DEBUG(10,("message_dispatch: received msg_type=%d "
"src_pid=%u\n", msg_type,
(unsigned int) procid_to_pid(&src)));
n_handled = 0;
- for (dfn = dispatch_fns; dfn; dfn = next) {
- next = dfn->next;
+ for (dfn = dispatch_fns; dfn; dfn = dfn->next) {
if (dfn->msg_type == msg_type) {
DEBUG(10,("message_dispatch: processing message of type %d.\n", msg_type));
dfn->fn(msg_type, src, len ? (void *)buf : NULL, len);
n_handled++;
+ break;
}
}
if (!n_handled) {
- DEBUG(5,("message_dispatch: warning: no handlers registed for "
+ DEBUG(5,("message_dispatch: warning: no handler registed for "
"msg_type %d in pid %u\n",
msg_type, (unsigned int)sys_getpid()));
}