Tue May 12 11:52:32 CDT 2009 Pekka Pessi <first.last@nokia.com>

* nua_session.c: always clean and remove INVITE client request in nua_invite_client_ack()
  Ignore-this: bdace77be7b43629b591f5adf7315341
  
  Coverity issue.



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13324 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2009-05-15 15:50:43 +00:00
parent 25fe8c3a4b
commit 672e48f8c8
2 changed files with 5 additions and 8 deletions

View File

@ -1 +1 @@
Fri May 15 10:49:06 CDT 2009
Fri May 15 10:49:56 CDT 2009

View File

@ -1250,9 +1250,7 @@ int nua_invite_client_ack(nua_client_request_t *cr, tagi_t const *tags)
if (!ds->ds_leg) {
/* XXX - fix nua_dialog_usage_remove_at() instead! */
nua_client_request_clean(cr);
nua_client_request_remove(cr);
return -1;
goto error;
}
assert(ds->ds_leg);
@ -1260,7 +1258,7 @@ int nua_invite_client_ack(nua_client_request_t *cr, tagi_t const *tags)
msg = nta_outgoing_getrequest(cr->cr_orq);
sip = sip_object(msg);
if (!msg)
return -1;
goto error;
invite_branch = nta_outgoing_branch(cr->cr_orq);
wa = sip_authorization(sip);
@ -1271,7 +1269,7 @@ int nua_invite_client_ack(nua_client_request_t *cr, tagi_t const *tags)
msg = nta_msg_create(nh->nh_nua->nua_nta, 0);
sip = sip_object(msg);
if (!msg)
return -1;
goto error;
cseq = sip_cseq_create(msg_home(msg), cr->cr_seq, SIP_METHOD_ACK);
@ -1386,6 +1384,7 @@ int nua_invite_client_ack(nua_client_request_t *cr, tagi_t const *tags)
if (error == -1)
msg_destroy(msg);
error:
cr->cr_acked = 1; /* ... or we have at least tried */
nua_client_request_clean(cr);
@ -1617,7 +1616,6 @@ static int nua_session_usage_shutdown(nua_handle_t *nh,
}
else if (cri->cr_status < 300 && !cri->cr_acked) {
nua_invite_client_ack(cri, NULL);
nua_client_request_clean(cri);
}
}
if (nua_client_create(nh, nua_r_bye, &nua_bye_client_methods, NULL) != 0)
@ -3418,7 +3416,6 @@ static int nua_update_client_report(nua_client_request_t *cr,
next_state = nua_callstate_ready;
else
next_state = nua_callstate_terminating;
nua_client_request_clean(du->du_cr);
}
}