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

Freeswitch SVN mikej at freeswitch.org
Wed Feb 27 16:58:17 EST 2008


Author: mikej
Date: Wed Feb 27 16:58:17 2008
New Revision: 7760

Modified:
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_cancel_bye.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.h
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_ops.c

Log:
can't pull patches one at a time because they don't compile



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	Wed Feb 27 16:58:17 2008
@@ -1854,9 +1854,8 @@
     nua_client_request_t const *cr;
 
     for (sr0 = nh->nh_ds->ds_sr; sr0; sr0 = sr0->sr_next) {
-      /* Final response have not been sent to previous INVITE */
-      if (sr0->sr_method == sip_method_invite && 
-	  nua_server_request_is_pending(sr0))
+      /* Previous INVITE has not been ACKed */
+      if (sr0->sr_method == sip_method_invite)
 	break;
       /* Or we have sent offer but have not received an answer */
       if (sr->sr_sdp && sr0->sr_offer_sent && !sr0->sr_answer_recv)
@@ -1879,10 +1878,8 @@
 
     ss = nua_dialog_usage_private(sr->sr_usage);
 
-    if (ss->ss_state < nua_callstate_completed &&
+    if (ss->ss_state < nua_callstate_ready &&
 	ss->ss_state != nua_callstate_init) {
-      /* We should never trigger this, 
-	 but better not to assert() on network input */
       return nua_server_retry_after(sr, 500, "Overlapping Requests 2", 0, 10);
     }
   }
@@ -1917,7 +1914,7 @@
   else if (sr->sr_usage) {
     nua_session_usage_t *ss = nua_dialog_usage_private(sr->sr_usage);
     if (ss->ss_state >= nua_callstate_terminating)
-      return SR_STATUS1(sr, 481, "Call is being terminated");
+      return SR_STATUS(sr, 481, "Call is being terminated");
   }
 
   if (nh->nh_soa) {

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c	Wed Feb 27 16:58:17 2008
@@ -293,7 +293,8 @@
   if ((event > nua_r_authenticate && event <= nua_r_ack)
       || event < nua_i_error
       || (nh && !nh->nh_valid)
-      || (nua->nua_shutdown && event != nua_r_shutdown)) {
+      || (nua->nua_shutdown && event != nua_r_shutdown && 
+	  !nua->nua_prefs->ngp_shutdown_events)) {
     if (msg)
       msg_destroy(msg);
     return event;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h	Wed Feb 27 16:58:17 2008
@@ -507,7 +507,6 @@
 #define NUTAG_NEWSUB_REF(x) nutag_newsub_ref, tag_bool_vr(&(x))
 SOFIAPUBVAR tag_typedef_t nutag_newsub_ref;
 
-
 #define NUTAG_REFER_EXPIRES(x)  nutag_refer_expires, tag_uint_v((x))
 SOFIAPUBVAR tag_typedef_t nutag_refer_expires;
 #define NUTAG_REFER_EXPIRES_REF(x) nutag_refer_expires_ref, tag_uint_vr((&(x)))

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_cancel_bye.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_cancel_bye.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_cancel_bye.c	Wed Feb 27 16:58:17 2008
@@ -1433,6 +1433,9 @@
   a_call->sdp = "m=audio 5008 RTP/AVP 8";
   c_call->sdp = "m=audio 5010 RTP/AVP 0 8";
 
+  if (!ctx->proxy_tests)
+    return 0;
+
 /* BYE after receiving 401
 
    A			C

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.h	Wed Feb 27 16:58:17 2008
@@ -178,7 +178,10 @@
       unsigned bit4:1, bit5:1, bit6:1, bit7:1;
       unsigned :0;
     } flags;
-
+    /* Accross-run state information */
+    struct {
+      unsigned n;
+    } state;
   } a, b, c;
 
   struct proxy *p;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_ops.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_ops.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_ops.c	Wed Feb 27 16:58:17 2008
@@ -182,6 +182,12 @@
 	    ep->name, (void *)nh, nua_event_name(event), phrase,
 	    nua_substate_name(t ? t->t_value : 0));
   }
+  else if ((int)event >= nua_i_bye || 
+	   event == nua_i_invite || event == nua_i_cancel ||
+	   event == nua_i_ack) {
+    fprintf(stderr, "%s %s.nua(%p): event %s %03d %s\n", timestamp,
+	    ep->name, (void *)nh, nua_event_name(event), status, phrase);
+  }
   else if ((int)event >= 0) {
     fprintf(stderr, "%s %s.nua(%p): event %s %s\n", timestamp,
 	    ep->name, (void *)nh, nua_event_name(event), phrase);



More information about the Freeswitch-svn mailing list