]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Avoiding Segfaults from buggy depend libs
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 13 Jan 2007 03:28:08 +0000 (03:28 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 13 Jan 2007 03:28:08 +0000 (03:28 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3953 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index 3369deb8506d033630644c37f9675a32ba1f8798..4b16c79e196ea35f72347d99e15f492adee91480 100644 (file)
@@ -2152,6 +2152,11 @@ static uint8_t negotiate_sdp(switch_core_session_t *session, sdp_session_t *sdp)
 
        channel = switch_core_session_get_channel(session);
        
+    if (!sdp->sdp_connection) {
+        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot find a c= line in the sdp!\n");
+        return 0;
+    }
+
        if ((tech_pvt->origin = switch_core_session_strdup(session, (char *) sdp->sdp_origin->o_username))) {
                if (strstr(tech_pvt->origin, "CiscoSystemsSIP-GW-UserAgent")) {
                        switch_set_flag_locked(tech_pvt, TFLAG_BUGGY_2833);