]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix regression from regression
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 3 Jun 2014 00:26:24 +0000 (05:26 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 3 Jun 2014 00:26:24 +0000 (05:26 +0500)
src/mod/endpoints/mod_sofia/sofia.c

index 2602cd57d261cd20050273afb849a3686abdcc6b..a7ba0f036a5ccdacf8e1b532e29a16e04b8ed753 100644 (file)
@@ -5787,11 +5787,13 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                }
        }
 
-       if (tech_pvt && (status > 100 || switch_channel_test_flag(channel, CF_ANSWERED)) && status < 300 && !r_sdp && tech_pvt->last_sdp_str) {
-               r_sdp = tech_pvt->last_sdp_str;
-       }
+       if (tech_pvt) {
+               if ((status > 100 || switch_channel_test_flag(channel, CF_ANSWERED)) && status < 300 && !r_sdp && tech_pvt->last_sdp_str) {
+                       r_sdp = tech_pvt->last_sdp_str;
+               }
 
-       tech_pvt->last_sdp_str = NULL;
+               tech_pvt->last_sdp_str = NULL;
+       }
        
        if ((channel && (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA))) ||
                (sofia_test_flag(profile, TFLAG_INB_NOMEDIA) || sofia_test_flag(profile, TFLAG_PROXY_MEDIA))) {