[Freeswitch-svn] [commit] r4780 - in freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip: . libsofia-sip-ua/iptsec libsofia-sip-ua/nta libsofia-sip-ua/nua libsofia-sip-ua/nua/sofia-sip libsofia-sip-ua/sdp libsofia-sip-ua/sip libsofia-sip-ua/su libsofia-sip-ua/tport packages

Freeswitch SVN mikej at freeswitch.org
Wed Mar 28 13:35:24 EDT 2007


Author: mikej
Date: Wed Mar 28 13:35:23 2007
New Revision: 4780

Modified:
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/RELEASE
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/configure.ac
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/sdp/run_test_sdp
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/sip/sip_util.c
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c
   freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/packages/   (props changed)

Log:
sync up to sofia-sip 1.12.6 rc (1.12.5work3)

Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/RELEASE
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/RELEASE	(original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/RELEASE	Wed Mar 28 13:35:23 2007
@@ -5,28 +5,16 @@
 Changes since last release
 --------------------------
 
-<changes since last written in freshmeat.net "Changes:" style;
- and in less than 10 lines, written in 3rd person English, with
- complete sentences />
-
-Bugs in blaa and foo have been fixed. The stack now supports
-use of foobar...
+Numerous nua bugs introduced in the release 1.12.5 have been fixed. Support
+for nextnonce in Authentication-Info header has been added. The nua engine
+now fully supports application-driven SDP.
 
 API/ABI changes and versioning
 ------------------------------
 
-<see previous release notes at
- http://sofia-sip.sourceforge.net/relnotes/ for examples ;
- - should include all changes to public headers, and 
-   other important information to developers; 
- - and should be updated _continuously_! />
-
-**template**: New features in API are marked with Doxytag macro @VERSION_1_XX_X.
-
 libsofia-sip-ua:
-- **template**: Added foobar() function (sofia-sip/foobar.h).
-- Added tag NUTAG_AUTH_CACHE() determining when to include credentials in
-  the request
+- Added tag NUTAG_AUTH_CACHE() <sofia-sip/nua_tag.h> determining when to 
+  include credentials in the request
 - Added kqueue and /dev/poll interfaces (su_devpoll_port_create(),
   su_devpoll_clone_start(), su_kqueue_port_create(), su_kqueue_clone_start()
   in <sofia-sip/su_wait.h>)
@@ -48,19 +36,8 @@
 Contributors to this release
 ----------------------------
 
-<list of people who contributed to _this_ release
- - update as people's patches are added, or when you commit stuff
- - current development team members (see AUTHORS) may be omitted,
-   or listed at the end of the contribur list (depending on the scope 
-   of the work done since the last release)
- - name of the contributor should be enough (email addresses in AUTHORS),
-   plus a _brief_ description of what was contributed
- - roughly sorted by number of patches accepted
-/> 
-
-- **template**: First Surname (patch to nua/soa/msg)
-- Martti Mela (kqueue interface to Max OS X and FreeBSD)
 - Pekka Pessi (/dev/poll interface to Solaris, kqueue)
+- Martti Mela (kqueue interface to Max OS X and FreeBSD)
 - Michael Jerris (Solaris patches)
 - Colin Whittaker (sresolv patch)
 
@@ -72,24 +49,25 @@
 The Sofia-SIP has been compiled and tested on Solaris. The /dev/poll
 interface (in su_devpoll_port.c) has been added for Solaris. Likewise, the
 kqueue interface (in su_kqueue_port.c) has been added for FreeBSD and Mac OS
-X.
+X. There is also select-based reactor for systems without poll().
 
-<information about major new features
- - new/changed/removed functionality
- - links to further documentation
- - section may be omitted for minor releases
-/> 
+The client authentication in nua has been updated. The nextnonce in
+Authentication-Info or Proxy-Authentication-Info headers is now. The
+NUTAG_AUTH_CACHE() policy determines how the cached credentials are used. By
+default, the credentials are included in each request within the dialog,
+however, with the NUTAG_AUTH_CACHE(nua_auth_cache_challenged) the client
+authenticates requests only after they have been challenged.
+
+The application can now fully control the SDP negotiation (when soa is
+disabled with NUTAG_MEDIA_ENABLE(0)). The application can send UPDATE and
+PRACK requests and respond to them.
 
 Bugs fixed in this release
 --------------------------
 
-< notable bugs fixed in this release
- - check the sf.net bug tracker; see closed bugs,
-   sorted by closing date
- - other bugs as fixed in CVS/darcs
-/>
-
-- **template**: #9499652 sf.net bug item title
+- Fixed problem logging long lines from with TPORT_LOG.
+  Problem reported by Mike Murdock and Michael Jerris.
+- Nua now includes the SDP capabilities in the response to the OPTIONS
 - Fixed assertion failure because BYE destroyed a session twice.
   Problem reported by Michael Jerris.
 - Fixed crash caused by a 0-length UDP datagram.

Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/configure.ac
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/configure.ac	(original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/configure.ac	Wed Mar 28 13:35:23 2007
@@ -11,14 +11,14 @@
 dnl ---------------------------
 
 dnl update both the version for AC_INIT and the LIBSOFIA_SIP_UA_MAJOR_MINOR
-AC_INIT([sofia-sip], [1.12.5work])
+AC_INIT([sofia-sip], [1.12.5work3])
 AC_CONFIG_SRCDIR([libsofia-sip-ua/sip/sofia-sip/sip.h])
 AC_SUBST(VER_LIBSOFIA_SIP_UA_MAJOR_MINOR, [1.12])
 dnl Includedir specific to this sofia version
 AC_SUBST(include_sofiadir, '${includedir}/sofia-sip-1.12')
-AC_SUBST(LIBVER_SOFIA_SIP_UA_CUR, [4])
+AC_SUBST(LIBVER_SOFIA_SIP_UA_CUR, [5])
 AC_SUBST(LIBVER_SOFIA_SIP_UA_REV, [0])
-AC_SUBST(LIBVER_SOFIA_SIP_UA_AGE, [4])
+AC_SUBST(LIBVER_SOFIA_SIP_UA_AGE, [5])
 AC_SUBST(LIBVER_SOFIA_SIP_UA_SOVER, [0]) # CUR-AGE
 AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_CUR, [3])
 AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_REV, [0])

Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile	(original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile	Wed Mar 28 13:35:23 2007
@@ -11,6 +11,7 @@
 TAGFILES           += ../docs/url.doxytags=../url
 TAGFILES           += ../docs/msg.doxytags=../msg
 TAGFILES           += ../docs/sip.doxytags=../sip
+TAGFILES           += ../docs/http.doxytags=../http
 TAGFILES           += ../docs/sresolv.doxytags=../sresolv
 TAGFILES           += ../docs/tport.doxytags=../tport
 TAGFILES           += ../docs/nta.doxytags=../nta

Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c	(original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c	Wed Mar 28 13:35:23 2007
@@ -185,22 +185,24 @@
 
 /** Store authentication info to authenticators.
  *
- * The function auc_info() feeds the authentication data from the
- * authentication info @a info to the list of authenticators @a auc_list.
+ * The function auc_info() feeds the authentication data from the @b
+ * Authentication-Info header @a info to the list of authenticators @a
+ * auc_list.
  *
  * @param[in,out] auc_list  list of authenticators to be updated
- * @param[in] info      info to be processed
- * @param[in] crcl      corresponding credential class
+ * @param[in] info        info header to be processed
+ * @param[in] credential_class      corresponding credential class
  *
- * The authentication info can be in either Authentication-Info or in
- * Proxy-Authentication-Info headers.
- * If the header is Authentication-Info, the @a crcl should be
- * #sip_authorization_class or #http_authorization_class.
- * Likewise, If the header is Proxy-Authentication-Info, the @a crcl should
- * be #sip_proxy_authorization_class or #http_proxy_authorization_class.
-
- * The authentication into usually contains next nonce or mutual
- * authentication information. We handle only nextnonce parameter. 
+ * The authentication info can be in either @AuthenticationInfo or in
+ * @ProxyAuthenticationInfo headers. If the header is @AuthenticationInfo,
+ * the @a credential_class should be #sip_authorization_class or
+ * #http_authorization_class. Likewise, If the header is
+ * @ProxyAuthenticationInfo, the @a credential_class should be
+ * #sip_proxy_authorization_class or #http_proxy_authorization_class.
+
+ * The authentication into header usually contains next nonce or mutual
+ * authentication information. Currently, only the nextnonce parameter is
+ * processed.
  *
  * @bug
  * The result can be quite unexpected if there are more than one
@@ -214,7 +216,7 @@
  * @NEW_1_12_5
  */
 int auc_info(auth_client_t **auc_list,
-	     msg_auth_info_t const *ai,
+	     msg_auth_info_t const *info,
 	     msg_hclass_t *credential_class)
 {
   auth_client_t *ca;
@@ -224,7 +226,7 @@
 
   /* Update matching authenticator */
   for (ca = *auc_list; ca; ca = ca->ca_next) {
-    int updated = ca_info(ca, ai, credential_class);
+    int updated = ca_info(ca, info, credential_class);
     if (updated < 0)
       return -1;
     if (updated >= 1)
@@ -243,12 +245,12 @@
  */
 static
 int ca_info(auth_client_t *ca, 
-	    msg_auth_info_t const *ai,
+	    msg_auth_info_t const *info,
 	    msg_hclass_t *credential_class)
 {
-  assert(ca); assert(ai);
+  assert(ca); assert(info);
 
-  if (!ca || !ai)
+  if (!ca || !info)
     return -1;
 
   if (!ca->ca_credential_class)
@@ -263,7 +265,7 @@
       || !ca->ca_auc->auc_info)
     return 0;
 
-  return ca->ca_auc->auc_info(ca, ai);
+  return ca->ca_auc->auc_info(ca, info);
 }
 
 
@@ -735,7 +737,7 @@
 				    msg_payload_t const *body,
 				    msg_header_t **);
 static int auc_digest_info(auth_client_t *ca, 
-			   msg_auth_info_t const *ai);
+			   msg_auth_info_t const *info);
 
 static const auth_client_plugin_t ca_digest_plugin = 
 { 
@@ -796,14 +798,14 @@
 }
 
 static int auc_digest_info(auth_client_t *ca,
-			   msg_auth_info_t const *ai)
+			   msg_auth_info_t const *info)
 {
   auth_digest_client_t *cda = (auth_digest_client_t *)ca;
   su_home_t *home = ca->ca_home;
   char const *nextnonce = NULL;
   issize_t n;
 
-  n = auth_get_params(home, ai->ai_params,
+  n = auth_get_params(home, info->ai_params,
 		      "nextnonce=", &nextnonce,
 		      NULL);
 

Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	(original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	Wed Mar 28 13:35:23 2007
@@ -1823,10 +1823,20 @@
   if (self->sa_contact)
     return 0;
 
-  if (self->sa_vias)
-    v1 = self->sa_vias;
-  else
-    v1 = self->sa_public_vias;
+  for (v1 = self->sa_vias ? self->sa_vias : self->sa_public_vias;
+       v1;
+       v1 = v1->v_next) {
+    if (host_is_ip_address(v1->v_host)) {
+      if (!host_is_local(v1->v_host))
+	break;
+    }
+    else if (!host_has_domain_invalid(v1->v_host)) {
+      break;
+    }
+  }
+
+  if (v1 == NULL)
+    v1 = self->sa_vias ? self->sa_vias : self->sa_public_vias;
 
   if (!v1)
     return -1;

Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c	(original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c	Wed Mar 28 13:35:23 2007
@@ -4010,7 +4010,7 @@
     else
       *return_cd = NULL;
 
-    if (!*return_pl || !*return_cd)
+    if (!*return_pl || !*return_ct)
       return -1;
 
     if (session && !*return_cd)

Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h	(original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h	Wed Mar 28 13:35:23 2007
@@ -1262,7 +1262,9 @@
  *    - nua_auth_cache_challenged (1) - include credentials only when 
  *                                      challenged
  *    
- * Corresponding tag taking reference parameter is NUTAG_AUTH_CACHE_REF()
+ * Corresponding tag taking reference parameter is NUTAG_AUTH_CACHE_REF().
+ *
+ * @NEW_1_12_6
  */
 #define NUTAG_AUTH_CACHE(x)   nutag_auth_cache, tag_int_v(x)
 SOFIAPUBVAR tag_typedef_t nutag_auth_cache;
@@ -1270,7 +1272,7 @@
 #define NUTAG_AUTH_CACHE_REF(x) nutag_auth_cache_ref, tag_int_vr(&(x))
 SOFIAPUBVAR tag_typedef_t nutag_auth_cache_ref;
 
-/** Authentication caching policy */
+/** Authentication caching policy. @NEW_1_12_6 */
 enum nua_auth_cache {
   /** Include credentials within dialog (default) */
   nua_auth_cache_dialog = 0,

Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/sdp/run_test_sdp
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/sdp/run_test_sdp	(original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/sdp/run_test_sdp	Wed Mar 28 13:35:23 2007
@@ -6,7 +6,7 @@
 #
 
 test_sdp="${1:-./test_sdp}"
-tests="${2:-tests}"
+tests="${2:-${0%/*}/tests}"
 
 if test -r $tests/message-1.sdp ; then
 
@@ -17,6 +17,7 @@
 done
 
 else 
-    echo "sdp run-tests: no tests found, skipping."
+    echo "sdp run-tests: no tests found in $tests, skipping."
+    exit 77
 fi
 

Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile	(original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile	Wed Mar 28 13:35:23 2007
@@ -25,4 +25,6 @@
 
 @INCLUDE = sip.doxyaliases
 
+PREDEFINED += SU_HAVE_EXPERIMENTAL=1
+
 IMAGE_PATH           += images

Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/sip/sip_util.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/sip/sip_util.c	(original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/sip/sip_util.c	Wed Mar 28 13:35:23 2007
@@ -247,8 +247,8 @@
     if (port || host_is_ip_address(host))
       transport = NULL;
   }
-  else if (port && host_is_ip_address(host) &&
-	   strcmp(port, SIP_DEFAULT_SERV) == 0) {
+  else if (port && strcmp(port, SIP_DEFAULT_SERV) == 0 &&
+	   (host_is_ip_address(host) || host_has_domain_invalid(host))) {
     port = NULL;
   }
 

Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c	(original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c	Wed Mar 28 13:35:23 2007
@@ -157,6 +157,7 @@
   unsigned char   sut_set;	/**< Timer is set (inserted in tree) */
 };
 
+/** @internal Timer running status */ 
 enum sut_running {
   reset = 0,		/**< Timer is not running */
   run_at_intervals = 1, /**< Compensate missed wakeup calls */

Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c	(original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c	Wed Mar 28 13:35:23 2007
@@ -221,17 +221,17 @@
       n = strncspn(s, end - s, "\r\n");
 
       if (linelen + n > MAX_LINELEN) {
-	n = MAX_LINELEN - n - linelen;
+	n = MAX_LINELEN - linelen;
 	truncated = logged + n;
       }
 
-      su_log("%s%.*s", linelen > n ? "" : "   ", (int)n, s);
+      su_log("%s%.*s", linelen > 0 ? "" : "   ", (int)n, s);
       s += n, linelen += n, logged += n;
 
       if (truncated)
 	break;
       if (s == end)
-	continue;
+	break;
 
       linelen = 0;
       su_log("\n");



More information about the Freeswitch-svn mailing list