git-svn-id: http://svn.openzap.org/svn/openzap/trunk@194 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Anthony Minessale 2007-06-01 15:40:12 +00:00
parent c2149312b3
commit 5b82eb3815
1 changed files with 9 additions and 2 deletions

View File

@ -605,7 +605,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
switch_core_session_t **new_session, switch_memory_pool_t **pool) switch_core_session_t **new_session, switch_memory_pool_t **pool)
{ {
char *p, *dest; char *p, *dest = NULL;
int span_id = 0, chan_id = 0; int span_id = 0, chan_id = 0;
zap_channel_t *zchan = NULL; zap_channel_t *zchan = NULL;
switch_call_cause_t cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER; switch_call_cause_t cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
@ -626,6 +626,11 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
} }
} }
if (!dest) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid dial string\n");
return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
if (!span_id) { if (!span_id) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing span\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing span\n");
return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER; return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
@ -797,7 +802,7 @@ static ZIO_SIGNAL_CB_FUNCTION(on_fxs_signal)
switch_core_session_t *session = NULL; switch_core_session_t *session = NULL;
switch_channel_t *channel = NULL; switch_channel_t *channel = NULL;
private_t *tech_pvt = NULL; private_t *tech_pvt = NULL;
zap_status_t status; zap_status_t status = ZAP_SUCCESS;
zap_log(ZAP_LOG_DEBUG, "got fxs sig [%s]\n", zap_signal_event2str(sigmsg->event_id)); zap_log(ZAP_LOG_DEBUG, "got fxs sig [%s]\n", zap_signal_event2str(sigmsg->event_id));
@ -877,6 +882,8 @@ static ZIO_SIGNAL_CB_FUNCTION(on_zap_signal)
} }
break; break;
} }
return ZAP_SUCCESS;
} }
static void zap_logger(char *file, const char *func, int line, int level, char *fmt, ...) static void zap_logger(char *file, const char *func, int line, int level, char *fmt, ...)