]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't respond w/ dtls when we don't support it
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 5 Feb 2013 21:10:48 +0000 (15:10 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 1 Apr 2013 02:27:23 +0000 (21:27 -0500)
src/switch_core_media.c

index 8a64455682cb00d05ed900c1af43df4238a7d5af..6c60626858af3385251722006ce2b727fcc792d0 100644 (file)
@@ -1822,7 +1822,7 @@ static void check_ice(switch_media_handle_t *smh, switch_media_type_t type, sdp_
                } else if (!strcasecmp(attr->a_name, "ice-options")) {
                        engine->ice_in.options = switch_core_session_strdup(smh->session, attr->a_value);
                        
-               } else if (!strcasecmp(attr->a_name, "fingerprint") && !zstr(attr->a_value)) {
+               } else if (switch_rtp_has_dtls() && !strcasecmp(attr->a_name, "fingerprint") && !zstr(attr->a_value)) {
                        char *p;
 
                        engine->remote_dtls_fingerprint.type = switch_core_session_strdup(smh->session, attr->a_value);
@@ -4667,10 +4667,13 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
                        smh->mparams->rtcp_video_interval_msec = "5000";
                }
 
-               if (switch_channel_test_flag(session->channel, CF_WEBRTC) || switch_true(switch_channel_get_variable(smh->session->channel, "rtp_use_dtls"))) {
-                       switch_channel_set_flag(smh->session->channel, CF_DTLS);
-                       switch_channel_set_flag(smh->session->channel, CF_SECURE);
-                       generate_local_fingerprint(smh, SWITCH_MEDIA_TYPE_AUDIO);
+               if ( switch_rtp_has_dtls() ) {
+                       if (switch_channel_test_flag(session->channel, CF_WEBRTC) ||
+                               switch_true(switch_channel_get_variable(smh->session->channel, "rtp_use_dtls"))) {
+                               switch_channel_set_flag(smh->session->channel, CF_DTLS);
+                               switch_channel_set_flag(smh->session->channel, CF_SECURE);
+                               generate_local_fingerprint(smh, SWITCH_MEDIA_TYPE_AUDIO);
+                       }
                }
 
                switch_core_session_check_outgoing_crypto(session, "rtp_secure_media");