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

Freeswitch SVN mikej at freeswitch.org
Sun May 25 11:23:12 EDT 2008


Author: mikej
Date: Sun May 25 11:23:11 2008
New Revision: 8639

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

Log:
Thu May 22 10:45:32 EDT 2008  Pekka.Pessi at nokia.com
  * nua_session.c: handling answer better by nua_prack_server_init()
  
  Fixed klocwork issue, too.


Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Sun May 25 11:23:11 2008
@@ -1 +1 @@
-Sun May 25 11:22:40 EDT 2008
+Sun May 25 11:23:06 EDT 2008

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c	Sun May 25 11:23:11 2008
@@ -2694,19 +2694,22 @@
     return sr->sr_status;
 
   if (sr->sr_sdp) {
-    nua_session_usage_t *ss = nua_dialog_usage_private(sr->sr_usage);
+    nua_session_usage_t *ss = NUA_DIALOG_USAGE_PRIVATE(sr->sr_usage);
+    char const *offeranswer;
 
     /* XXX - check for overlap? */
     
-    if (sri->sr_offer_sent)
-      sr->sr_answer_recv = 1, ss->ss_oa_recv = Answer;
-    else 
-      sr->sr_offer_recv = 1, ss->ss_oa_recv = Offer;
+    if (sri->sr_offer_sent && !sri->sr_answer_recv)
+      sr->sr_answer_recv = 1, sri->sr_answer_recv = 1, offeranswer = Answer;
+    else
+      sr->sr_offer_recv = 1, offeranswer = Offer;
+
+    ss->ss_oa_recv = offeranswer;
 
     if (nh->nh_soa &&
 	soa_set_remote_sdp(nh->nh_soa, NULL, sr->sr_sdp, sr->sr_sdp_len) < 0) {
       SU_DEBUG_5(("nua(%p): %s server: error parsing %s\n", (void *)nh,
-		  "PRACK", Offer));
+		  "PRACK", offeranswer));
       return 
 	sr->sr_status = soa_error_as_sip_response(nh->nh_soa, &sr->sr_phrase);
     }



More information about the Freeswitch-svn mailing list