]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
block code when no dtls is present
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 5 Feb 2013 21:27:50 +0000 (15:27 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 1 Apr 2013 02:27:24 +0000 (21:27 -0500)
src/switch_core_media.c

index 6c60626858af3385251722006ce2b727fcc792d0..42d9f6d922c0cb410022f3f8c5e3ed50568cb288 100644 (file)
@@ -2307,9 +2307,12 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
                } else if (m->m_type == sdp_media_audio && m->m_port && !got_audio) {
                        sdp_rtpmap_t *map;
 
-                       for (attr = m->m_attributes; attr; attr = attr->a_next) {
-                               if (!strcasecmp(attr->a_name, "fingerprint") && !zstr(attr->a_value)) {
-                                       got_crypto = 1;
+                       if (switch_rtp_has_dtls()) {
+                               for (attr = m->m_attributes; attr; attr = attr->a_next) {
+                                       
+                                       if (!strcasecmp(attr->a_name, "fingerprint") && !zstr(attr->a_value)) {
+                                               got_crypto = 1;
+                                       }
                                }
                        }