]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5331
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 23 Apr 2013 23:08:41 +0000 (18:08 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 23 Apr 2013 23:08:41 +0000 (18:08 -0500)
src/switch_core_media.c

index ff3b12bf82c064971ada7352b906d24836c6ed17..ed1ea87ae5721a98ac415b01c3785a62933b548d 100644 (file)
@@ -2626,14 +2626,12 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
                                                                near_rate = map->rm_rate;
                                                                near_match = imp;
                                                                near_map = mmap = map;
-                                                               
+                                                               match = 0;
+
                                                                if (switch_true(switch_channel_get_variable_dup(channel, "rtp_negotiate_near_match", SWITCH_FALSE, -1))) {
-                                                                       mimp = imp;
-                                                                       mmap = map;
-                                                                       match = 1;
-                                                                       break;
+                                                                       goto near_match;
                                                                }
-                                                               match = 0;
+
                                                                continue;
                                                        }
                                                }
@@ -2654,6 +2652,8 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
                                }
                        }
 
+               near_match:
+
                        if (!match && near_match) {
                                const switch_codec_implementation_t *search[1];
                                char *prefs[1];