]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix regression from regression
authorBrian West <brian@freeswitch.org>
Tue, 3 Jun 2014 00:25:04 +0000 (19:25 -0500)
committerBrian West <brian@freeswitch.org>
Tue, 3 Jun 2014 00:25:04 +0000 (19:25 -0500)
src/mod/endpoints/mod_sofia/sofia.c

index a825573feb3b1767fb9eca639173c6bb2988cfcc..0ae369dfdafd00cc7a903c076a575a16c331cbc8 100644 (file)
@@ -6172,11 +6172,12 @@ 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->mparams.last_sdp_str) {
-               r_sdp = tech_pvt->mparams.last_sdp_str;
+       if (tech_pvt) {
+               if ((status > 100 || switch_channel_test_flag(channel, CF_ANSWERED)) && status < 300 && !r_sdp && tech_pvt->mparams.last_sdp_str) {
+                       r_sdp = tech_pvt->mparams.last_sdp_str;
+               }
+               tech_pvt->mparams.last_sdp_str = NULL;
        }
-       
-       tech_pvt->mparams.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))) {