]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5755 Fix regression if rtp_secure_media=false, it will force encryption.
authorMarc Olivier Chouinard <mochouinard@moctel.com>
Tue, 4 Mar 2014 14:42:17 +0000 (09:42 -0500)
committerMarc Olivier Chouinard <mochouinard@moctel.com>
Tue, 4 Mar 2014 14:42:17 +0000 (09:42 -0500)
src/switch_core_media.c

index 5167ea534f8e95eaef7f6cdafe55dd96de9546a3..56c3662840749eee5b89d9f92fa319e24dcaf769 100644 (file)
@@ -2840,7 +2840,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
        }
 
        if (!switch_channel_test_flag(session->channel, CF_DTLS) && (var = switch_channel_get_variable(session->channel, "rtp_secure_media"))) {
-               if (strcasecmp(var, "optional")) {
+               if (!(switch_false(var) || !strcasecmp(var, "optional"))) {
                        needs_crypto = 1;
 
                        switch_channel_set_variable(session->channel, "rtp_crypto_mandatory", "true");