Commit 07b9c644 authored by Pekka Pessi's avatar Pekka Pessi

nta: clarify outgoing_ack() logic

Ignore-this: a745b3e7df63835d9768ec9dc3d5c5b2

Coverity issue.

darcs-hash:20090514180543-db55f-eff206a63a876e3e7f900fe2e2ebfb5012f1c005.gz
parent 19256546
......@@ -9340,7 +9340,6 @@ static int outgoing_duplicate(nta_outgoing_t *orq,
*/
void outgoing_ack(nta_outgoing_t *orq, sip_t *sip)
{
nta_outgoing_t *ack;
msg_t *ackmsg;
assert(orq);
......@@ -9354,18 +9353,16 @@ void outgoing_ack(nta_outgoing_t *orq, sip_t *sip)
assert(orq->orq_tport);
ackmsg = outgoing_ackmsg(orq, SIP_METHOD_ACK, SIPTAG_TO(sip->sip_to), TAG_END());
if (!ackmsg)
return;
if (ackmsg) {
if ((ack = outgoing_create(orq->orq_agent, NULL, NULL,
NULL, orq->orq_tpn, ackmsg,
NTATAG_BRANCH_KEY(sip->sip_via->v_branch),
NTATAG_USER_VIA(1),
NTATAG_STATELESS(1),
TAG_END())))
;
else
msg_destroy(ackmsg);
}
if (!outgoing_create(orq->orq_agent, NULL, NULL,
NULL, orq->orq_tpn, ackmsg,
NTATAG_BRANCH_KEY(sip->sip_via->v_branch),
NTATAG_USER_VIA(1),
NTATAG_STATELESS(1),
TAG_END()))
msg_destroy(ackmsg);
}
/** Generate messages for hop-by-hop ACK or CANCEL.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment