Show confirmation error on real error only.
This commit is contained in:
parent
d90cc3e3a0
commit
7b9ac6df71
31
chan_capi.c
31
chan_capi.c
|
@ -2715,6 +2715,25 @@ static void capi_handle_facility_confirmation(_cmsg *CMSG, unsigned int PLCI, un
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* show error in confirmation
|
||||||
|
*/
|
||||||
|
static void show_capi_conf_error(char *msg, struct ast_capi_pvt *i, unsigned int PLCI, _cmsg *CMSG)
|
||||||
|
{
|
||||||
|
const char *name = type;
|
||||||
|
|
||||||
|
if (i)
|
||||||
|
name = i->name;
|
||||||
|
|
||||||
|
if (CMSG->Info == 0x2002) {
|
||||||
|
cc_ast_verbose(1, 1, VERBOSE_PREFIX_2 "%s: %s_CONF 0x%x (wrong state) PLCI=0x%x Command.Subcommand = %#x.%#x\n",
|
||||||
|
name, msg, CMSG->Info, PLCI, CMSG->Command, CMSG->Subcommand);
|
||||||
|
} else {
|
||||||
|
ast_log(LOG_WARNING, "%s: %s conf_error 0x%x PLCI=0x%x Command.Subcommand = %#x.%#x\n",
|
||||||
|
name, msg, CMSG->Info, PLCI, CMSG->Command, CMSG->Subcommand);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CAPI *_CONF
|
* CAPI *_CONF
|
||||||
*/
|
*/
|
||||||
|
@ -2767,14 +2786,12 @@ static void capi_handle_confirmation(_cmsg *CMSG, unsigned int PLCI, unsigned in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cc_ast_verbose(1, 1, VERBOSE_PREFIX_2 "%s: ALERT conf_error 0x%x PLCI=0x%x Command.Subcommand = %#x.%#x\n",
|
show_capi_conf_error("ALERT", i, PLCI, CMSG);
|
||||||
i->name, CMSG->Info, PLCI, CMSG->Command, CMSG->Subcommand);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CAPI_SELECT_B_PROTOCOL:
|
case CAPI_SELECT_B_PROTOCOL:
|
||||||
if (CMSG->Info) {
|
if (CMSG->Info) {
|
||||||
cc_ast_verbose(1, 1, VERBOSE_PREFIX_2 "%s: conf_error 0x%x PLCI=0x%x Command.Subcommand = %#x.%#x\n",
|
show_capi_conf_error("SELECT_B_PROTOCOL", i, PLCI, CMSG);
|
||||||
i->name, CMSG->Info, PLCI, CMSG->Command, CMSG->Subcommand);
|
|
||||||
} else {
|
} else {
|
||||||
if ((i->owner) && (i->FaxState)) {
|
if ((i->owner) && (i->FaxState)) {
|
||||||
capi_echo_canceller(i->owner, EC_FUNCTION_DISABLE);
|
capi_echo_canceller(i->owner, EC_FUNCTION_DISABLE);
|
||||||
|
@ -2784,8 +2801,7 @@ static void capi_handle_confirmation(_cmsg *CMSG, unsigned int PLCI, unsigned in
|
||||||
break;
|
break;
|
||||||
case CAPI_DATA_B3:
|
case CAPI_DATA_B3:
|
||||||
if (CMSG->Info) {
|
if (CMSG->Info) {
|
||||||
cc_ast_verbose(1, 1, VERBOSE_PREFIX_2 "%s: DATA_B3 conf_error 0x%x NCCI=0x%x\n",
|
show_capi_conf_error("DATA_B3", i, PLCI, CMSG);
|
||||||
i->name, CMSG->Info, NCCI);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CAPI_DISCONNECT:
|
case CAPI_DISCONNECT:
|
||||||
|
@ -2793,8 +2809,7 @@ static void capi_handle_confirmation(_cmsg *CMSG, unsigned int PLCI, unsigned in
|
||||||
case CAPI_LISTEN:
|
case CAPI_LISTEN:
|
||||||
case CAPI_INFO:
|
case CAPI_INFO:
|
||||||
if (CMSG->Info) {
|
if (CMSG->Info) {
|
||||||
cc_ast_verbose(1, 1, VERBOSE_PREFIX_2 "CAPI: conf_error 0x%x PLCI=0x%x Command.Subcommand = %#x.%#x\n",
|
show_capi_conf_error("", i, PLCI, CMSG);
|
||||||
CMSG->Info, PLCI, CMSG->Command, CMSG->Subcommand);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue