]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 1 Jun 2007 15:40:12 +0000 (15:40 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 1 Jun 2007 15:40:12 +0000 (15:40 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@194 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/mod_openzap/mod_openzap.c

index a2c974a59937a8e4f0e7c58acf40486b25dcd201..2a0e13c37e2f511ebd5fe60f4663fcf885ce5f1d 100644 (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)
 {
 
-       char *p, *dest;
+       char *p, *dest = NULL;
        int span_id = 0, chan_id = 0;
        zap_channel_t *zchan = NULL;
        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) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing span\n");
                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_channel_t *channel = 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));
 
@@ -877,6 +882,8 @@ static ZIO_SIGNAL_CB_FUNCTION(on_zap_signal)
                }
                break;
        }
+
+       return ZAP_SUCCESS;
 }
 
 static void zap_logger(char *file, const char *func, int line, int level, char *fmt, ...)