]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fail the call when the best match is a codec with no name.
authorMichael Jerris <mike@jerris.com>
Sat, 27 Jan 2007 04:45:54 +0000 (04:45 +0000)
committerMichael Jerris <mike@jerris.com>
Sat, 27 Jan 2007 04:45:54 +0000 (04:45 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4065 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index f5ec300242fdb479b4c0870dd0612df98d31d8a5..94c530ad9e5b9a4a383971e1443f67eaa038ea4f 100644 (file)
@@ -1348,6 +1348,12 @@ static switch_status_t tech_set_codec(private_object_t *tech_pvt, int force)
        channel = switch_core_session_get_channel(tech_pvt->session);
        assert(channel != NULL);
 
+       if (!tech_pvt->rm_encoding) {
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec with no name?\n");
+               terminate_session(&tech_pvt->session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, __LINE__);
+               return SWITCH_STATUS_FALSE;
+       }
+
        if (switch_core_codec_init(&tech_pvt->read_codec,  
                                                           tech_pvt->rm_encoding,
                                                           tech_pvt->rm_fmtp,