diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/messages.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c index 93e12ebe35a..10fc5af24d3 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -471,7 +471,6 @@ void message_dispatch(void) char *buf; char *msgs_buf; size_t len, total_len; - struct dispatch_fns *dfn; int n_handled; if (!received_signal) @@ -485,11 +484,15 @@ 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; + 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 = dfn->next) { + for (dfn = dispatch_fns; dfn; dfn = next) { + next = 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); |