From 053a38202e45e33a491f568f55e4fe5dcf401c7f Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Mon, 30 Jul 2012 16:20:47 +0000 Subject: [PATCH] Removed MDL/TEI management configuration warning message. Some telco switches send out MDL messages even though they are configured for PTP. Usually they are checking for assigned TEI's. Since these switches periodically poll for assigned TEI's, the message needlessly fills up log files. * Changed message warning level to a normal debug message level and reworded. (closes issue PRI-137) Reported by: Bart Coninckx git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2290 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- q921.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/q921.c b/q921.c index 093c9fa..d7a83a9 100644 --- a/q921.c +++ b/q921.c @@ -1484,8 +1484,20 @@ static pri_event *q921_receive_MDL(struct pri *ctrl, q921_u *h, int len) int tei; if (!BRI_NT_PTMP(ctrl) && !BRI_TE_PTMP(ctrl)) { - return pri_mkerror(ctrl, - "Received MDL/TEI managemement message, but configured for mode other than PTMP!\n"); + /* + * Some telco switches send out MDL messages even though they + * are configured for PTP. Usually they are checking for + * assigned TEI's. + */ + if (ctrl->debug & PRI_DEBUG_Q921_STATE) { + /* + * Send out this message in debug modes since it is possible the + * user has misconfigured their link for the wrong mode. + */ + pri_message(ctrl, "Not configured for PTMP. Ignoring MDL message: %d(%s)\n", + h->data[3], q921_tei_mgmt2str(h->data[3])); + } + return NULL; } if (ctrl->debug & PRI_DEBUG_Q921_STATE) {