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

Freeswitch SVN mikej at freeswitch.org
Fri May 9 13:43:16 EDT 2008


Author: mikej
Date: Fri May  9 13:43:16 2008
New Revision: 8333

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

Log:
Wed May  7 10:04:14 EDT 2008  Pekka Pessi <first.last at nokia.com>
  * nua_session.c: do not terminate session without soa if SDP O/A seems to fail
  
  SDP O/A may be buried inside MIME multipart



Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Fri May  9 13:43:16 2008
@@ -1 +1 @@
-Fri May  9 13:42:29 EDT 2008
+Fri May  9 13:43:01 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	Fri May  9 13:43:16 2008
@@ -1293,7 +1293,9 @@
       /* signal SOA that O/A round(s) is (are) complete */
 	soa_activate(nh->nh_soa, NULL);
     }
-    else if (nh->nh_soa == NULL && !(cr->cr_offer_sent && !cr->cr_answer_recv)) {
+    else if (nh->nh_soa == NULL
+	     /* NUA does not necessarily know dirty details */
+	     /* && !(cr->cr_offer_sent && !cr->cr_answer_recv) */) {
       ;
     }
     else {
@@ -3135,17 +3137,15 @@
 	(sr->sr_offer_recv && !sr->sr_answer_sent))
       break;
 
-  if (sr ||
-      (cri && cri->cr_offer_sent && !cri->cr_answer_recv) ||
-      (cri && cri->cr_offer_recv && !cri->cr_answer_sent)) {
-    if (nh->nh_soa == NULL) {
-      if (session_get_description(sip, NULL, NULL))
-	return nua_client_return(cr, 500, "Overlapping Offer/Answer", msg);
-    }
-  }
-  else if (nh->nh_soa == NULL) {
+  if (nh->nh_soa == NULL) {
     offer_sent = session_get_description(sip, NULL, NULL);
   }
+  else if (sr ||
+	   (cri && cri->cr_offer_sent && !cri->cr_answer_recv) ||
+	   (cri && cri->cr_offer_recv && !cri->cr_answer_sent)) {
+   if (session_get_description(sip, NULL, NULL))
+     return nua_client_return(cr, 500, "Overlapping Offer/Answer", msg);
+  }
   else if (!sip->sip_payload) {
     soa_init_offer_answer(nh->nh_soa);
 
@@ -3360,7 +3360,7 @@
 	if ((overlap = sr0->sr_offer_recv && !sr0->sr_answer_sent))
 	  break;
 
-    if (overlap)
+    if (nh->nh_soa && overlap)
       return nua_server_retry_after(sr, 500, "Overlapping Offer/Answer", 1, 9);
 
     if (nh->nh_soa &&



More information about the Freeswitch-svn mailing list