[Freeswitch-svn] [commit] r13354 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nta

FreeSWITCH SVN mikej at freeswitch.org
Fri May 15 09:19:19 PDT 2009


Author: mikej
Date: Fri May 15 11:19:19 2009
New Revision: 13354

Log:
Thu May 14 13:05:43 CDT 2009  Pekka Pessi <first.last at nokia.com>
  * nta: clarify outgoing_ack() logic
  Ignore-this: a745b3e7df63835d9768ec9dc3d5c5b2
  
  Coverity issue.


Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c

Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Fri May 15 11:19:19 2009
@@ -1 +1 @@
-Fri May 15 11:17:32 CDT 2009
+Fri May 15 11:18:36 CDT 2009

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	Fri May 15 11:19:19 2009
@@ -9353,7 +9353,6 @@
  */
 void outgoing_ack(nta_outgoing_t *orq, sip_t *sip)
 {
-  nta_outgoing_t *ack;
   msg_t *ackmsg;
 
   assert(orq);
@@ -9367,18 +9366,16 @@
   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.



More information about the Freeswitch-svn mailing list