]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
SFSIP-227
authorBrian West <brian@freeswitch.org>
Thu, 23 Sep 2010 16:16:47 +0000 (11:16 -0500)
committerBrian West <brian@freeswitch.org>
Thu, 23 Sep 2010 16:25:43 +0000 (11:25 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c

index 259a81f7389708641577c79b665d32cadc378bce..d2bf096249a4907d90fee763044416785f60da8f 100644 (file)
@@ -1238,7 +1238,12 @@ static void start_udptl(private_object_t *tech_pvt, switch_t38_options_t *t38_op
 
                switch_rtp_udptl_mode(tech_pvt->rtp_session);
 
-               if (remote_host && remote_port && !strcmp(remote_host, t38_options->remote_ip) && remote_port == t38_options->remote_port) {
+               if (!t38_options || !t38_options->remote_ip) {
+                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "No remote address\n");
+                       return;
+               }
+
+               if (remote_host && remote_port && remote_port == t38_options->remote_port && !strcmp(remote_host, t38_options->remote_ip)) {
                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Remote address:port [%s:%d] has not changed.\n",
                                                          t38_options->remote_ip, t38_options->remote_port);
                        return;
index 519cb3d3f91eaa20ad151423c88bae1a1abb505b..6a33b3ecd38da60cca828577cc8afda4be21fd17 100644 (file)
@@ -3450,9 +3450,9 @@ static switch_t38_options_t *tech_process_udptl(private_object_t *tech_pvt, sdp_
 
        t38_options->remote_port = m->m_port;
 
-       if (m->m_connections) {
+       if (m->m_connections && m->m_connections->c_address) {
                t38_options->remote_ip = switch_core_session_strdup(tech_pvt->session, m->m_connections->c_address);
-       } else if (sdp && sdp->sdp_connection) {
+       } else if (sdp && sdp->sdp_connection && sdp->sdp_connection->c_address) {
                t38_options->remote_ip = switch_core_session_strdup(tech_pvt->session, sdp->sdp_connection->c_address);
        }