From 59429435925561bb2a61c9a32e14381a622de6df Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Tue, 22 Sep 2009 15:45:41 +0000 Subject: [PATCH] add more info to unhandled types errors git-svn-id: http://svn.openzap.org/svn/openzap/trunk@838 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/mod_openzap/mod_openzap.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/libs/openzap/mod_openzap/mod_openzap.c b/libs/openzap/mod_openzap/mod_openzap.c index 843e77a9a1..1c093f74bb 100644 --- a/libs/openzap/mod_openzap/mod_openzap.c +++ b/libs/openzap/mod_openzap/mod_openzap.c @@ -499,7 +499,8 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session) break; default: { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Unhandled type for channel %s\n", switch_channel_get_name(channel)); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Unhandled channel type %d for channel %s\n", tech_pvt->zchan->type, + switch_channel_get_name(channel)); } break; } @@ -1369,8 +1370,8 @@ static ZIO_SIGNAL_CB_FUNCTION(on_fxo_signal) default: { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unhandled type for channel %d:%d\n", - sigmsg->channel->span_id, sigmsg->channel->chan_id); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unhandled msg type %d for channel %d:%d\n", + sigmsg->event_id, sigmsg->channel->span_id, sigmsg->channel->chan_id); } break; @@ -1576,8 +1577,8 @@ static ZIO_SIGNAL_CB_FUNCTION(on_fxs_signal) default: { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unhandled type for channel %d:%d\n", - sigmsg->channel->span_id, sigmsg->channel->chan_id); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unhandled msg type %d for channel %d:%d\n", + sigmsg->event_id, sigmsg->channel->span_id, sigmsg->channel->chan_id); } break; @@ -1764,8 +1765,8 @@ static ZIO_SIGNAL_CB_FUNCTION(on_clear_channel_signal) default: { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unhandled type for channel %d:%d\n", - sigmsg->channel->span_id, sigmsg->channel->chan_id); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unhandled msg type for channel %d:%d\n", + sigmsg->event_id, sigmsg->channel->span_id, sigmsg->channel->chan_id); } break; } @@ -1792,8 +1793,8 @@ static ZIO_SIGNAL_CB_FUNCTION(on_analog_signal) break; default: { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unhandled type for channel %d:%d\n", - sigmsg->channel->span_id, sigmsg->channel->chan_id); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unhandled analog channel type %d for channel %d:%d\n", + sigmsg->channel->type, sigmsg->channel->span_id, sigmsg->channel->chan_id); } break; }