]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9551 [mod_sofia] compare also session before setting TFLAG_SKIP_EARLY
authorLuis Azedo <luis.azedo@factorlusitano.com>
Sun, 21 Aug 2016 23:18:33 +0000 (18:18 -0500)
committerLuis Azedo <luis@2600hz.com>
Tue, 6 Sep 2016 23:14:47 +0000 (00:14 +0100)
src/mod/endpoints/mod_sofia/sofia.c

index 7f886a307d35d3201b3671ab7fc471df3593cc1f..c6dbbb507d3cdc6f4cf04aa4da49d6d145b5e34c 100644 (file)
@@ -6126,10 +6126,11 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
 
                if (status < 200) {
                        if (switch_core_session_get_partner(session, &other_session) == SWITCH_STATUS_SUCCESS) {
-                               private_object_t *other_tech_pvt = switch_core_session_get_private(other_session);
-
-                               if (sofia_test_flag(other_tech_pvt, TFLAG_3PCC)) {
-                                       sofia_set_flag_locked(tech_pvt, TFLAG_SKIP_EARLY);
+                               if(switch_core_session_compare(session, other_session)) {
+                                       private_object_t *other_tech_pvt = switch_core_session_get_private(other_session);
+                                       if (sofia_test_flag(other_tech_pvt, TFLAG_3PCC)) {
+                                               sofia_set_flag_locked(tech_pvt, TFLAG_SKIP_EARLY);
+                                       }
                                }
                                switch_core_session_rwunlock(other_session);
                        }