summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2002-01-03 03:42:33 +0000
committerMartin Pool <mbp@samba.org>2002-01-03 03:42:33 +0000
commit1a09c706fc09952c6c58e9a88a62d208b61903c5 (patch)
treec21e2e437fba3451e904e6c69a7935e23fcacb96
parent07a6e0d311edacbc560e7b54ca9325df9295300b (diff)
downloadsamba-1a09c706fc09952c6c58e9a88a62d208b61903c5.tar.gz
samba-1a09c706fc09952c6c58e9a88a62d208b61903c5.tar.bz2
samba-1a09c706fc09952c6c58e9a88a62d208b61903c5.zip
If we receive a message that is not handled then emit a gentle warning
to the log. (This used to be commit 53dd8b45397f5de7660594b9287341f8f4c91c43)
-rw-r--r--source3/lib/messages.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 5561127410..cd7eb8b82f 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -314,6 +314,7 @@ void message_dispatch(void)
void *buf;
size_t len;
struct dispatch_fns *dfn;
+ int n_handled;
if (!received_signal) return;
@@ -324,12 +325,19 @@ void message_dispatch(void)
while (message_recv(&msg_type, &src, &buf, &len)) {
DEBUG(10,("message_dispatch: received msg_type=%d src_pid=%d\n",
msg_type, (int) src));
+ n_handled = 0;
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, buf, len);
+ n_handled++;
}
}
+ if (!n_handled) {
+ DEBUG(5,("message_dispatch: warning: no handlers registed for "
+ "msg_type %d in pid%d\n",
+ msg_type, getpid()));
+ }
SAFE_FREE(buf);
}
}