stop race condition in sofia where we tried to send an ack on a dead call and turn off early hangup by default (if you dont know that that is, good, do not document this)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15891 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-12-11 00:28:54 +00:00
parent f69d3495c8
commit d13a46acd5
8 changed files with 30 additions and 13 deletions

View File

@@ -3833,6 +3833,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
case nua_callstate_completed:
case nua_callstate_received:
case nua_callstate_proceeding:
case nua_callstate_completing:
if (!(session && channel && tech_pvt)) goto done;
break;
default:
@@ -3890,9 +3891,9 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
break;
case nua_callstate_completing:
nua_ack(nh,
TAG_IF(tech_pvt && !zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)),
TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)),
TAG_END());
break;
goto done;
case nua_callstate_received:
if (!sofia_test_flag(tech_pvt, TFLAG_SDP)) {
if (r_sdp && !sofia_test_flag(tech_pvt, TFLAG_SDP)) {