From 53457e05bf1b0e8946a02b5d99075ab0e46fd608 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 5 Feb 2013 15:27:50 -0600 Subject: [PATCH] block code when no dtls is present --- src/switch_core_media.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 6c60626858..42d9f6d922 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -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; + } } }