freetdm: ISDN-Q921 Unsollicited protocol errors printed in DEBUG instead of INFO

This commit is contained in:
David Yat Sin 2011-03-11 14:48:26 -05:00
parent 373972c0e6
commit b0ded7ff3b
1 changed files with 10 additions and 11 deletions

View File

@ -662,6 +662,7 @@ void sngisdn_rcv_phy_ind(SuId suId, Reason reason)
void sngisdn_rcv_q921_ind(BdMngmt *status)
{
ftdm_span_t *ftdmspan;
unsigned loglevel = FTDM_LOG_LEVEL_INFO;
sngisdn_span_data_t *signal_data = g_sngisdn_data.dchans[status->t.usta.lnkNmb].spans[1];
@ -677,19 +678,11 @@ void sngisdn_rcv_q921_ind(BdMngmt *status)
}
switch (status->t.usta.alarm.category) {
case (LCM_CATEGORY_INTERFACE):
ftdm_log(FTDM_LOG_INFO, "[SNGISDN Q921] %s: %s: %s(%d): %s(%d)\n",
ftdmspan->name,
DECODE_LCM_CATEGORY(status->t.usta.alarm.category),
DECODE_LCM_EVENT(status->t.usta.alarm.event), status->t.usta.alarm.event,
DECODE_LCM_CAUSE(status->t.usta.alarm.cause), status->t.usta.alarm.cause);
case (LCM_CATEGORY_PROTOCOL):
loglevel = FTDM_LOG_LEVEL_DEBUG;
break;
default:
ftdm_log(FTDM_LOG_INFO, "[SNGISDN Q921] %s: %s: %s(%d): %s(%d)\n",
ftdmspan->name,
DECODE_LCM_CATEGORY(status->t.usta.alarm.category),
DECODE_LLD_EVENT(status->t.usta.alarm.event), status->t.usta.alarm.event,
DECODE_LLD_CAUSE(status->t.usta.alarm.cause), status->t.usta.alarm.cause);
loglevel = FTDM_LOG_LEVEL_INFO;
switch (status->t.usta.alarm.event) {
case ENTR_CONG: /* Entering Congestion */
@ -703,6 +696,12 @@ void sngisdn_rcv_q921_ind(BdMngmt *status)
}
break;
}
ftdm_log(FTDM_PRE, loglevel, "[SNGISDN Q921] %s: %s: %s(%d): %s(%d)\n",
ftdmspan->name,
DECODE_LCM_CATEGORY(status->t.usta.alarm.category),
DECODE_LCM_EVENT(status->t.usta.alarm.event), status->t.usta.alarm.event,
DECODE_LCM_CAUSE(status->t.usta.alarm.cause), status->t.usta.alarm.cause);
return;
}
void sngisdn_rcv_q931_ind(InMngmt *status)