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

Freeswitch SVN mikej at freeswitch.org
Tue Aug 12 13:03:43 EDT 2008


Author: mikej
Date: Tue Aug 12 13:03:42 2008
New Revision: 9267

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

Log:
Wed Jul 23 12:22:57 EDT 2008  Pekka Pessi <first.last at nokia.com>
  * nta: changed type of NTATAG_SERVER_RPORT() back to signed int
  
  Documented magic value 2 for server rport.



Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Tue Aug 12 13:03:42 2008
@@ -1 +1 @@
-Tue Aug 12 13:02:56 EDT 2008
+Tue Aug 12 13:03:36 EDT 2008

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	Tue Aug 12 13:03:42 2008
@@ -987,7 +987,7 @@
   void *smime         = agent->sa_smime;
   uint32_t flags      = agent->sa_flags;
   int rport           = agent->sa_rport;
-  unsigned server_rport    = agent->sa_server_rport;
+  int server_rport    = agent->sa_server_rport;
   int tcp_rport       = agent->sa_tcp_rport;
   unsigned preload         = agent->sa_preload;
   unsigned threadpool      = agent->sa_tport_threadpool;
@@ -1178,6 +1178,8 @@
 
   if (server_rport > 2)
     server_rport = 1;
+  else if (server_rport < 0)
+    server_rport = 1;
   agent->sa_server_rport = server_rport;
 
   agent->sa_bad_req_mask = bad_req_mask;
@@ -1295,7 +1297,7 @@
 	     NTATAG_PRELOAD(agent->sa_preload),
 	     NTATAG_PROGRESS(agent->sa_progress),
 	     NTATAG_REL100(agent->sa_invite_100rel),
-	     NTATAG_SERVER_RPORT(agent->sa_server_rport),
+	     NTATAG_SERVER_RPORT((int)(agent->sa_server_rport)),
 	     NTATAG_SIGCOMP_ALGORITHM(agent->sa_algorithm),
 	     NTATAG_SIGCOMP_OPTIONS(agent->sa_sigcomp_options ?
 				    agent->sa_sigcomp_options :

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c	Tue Aug 12 13:03:42 2008
@@ -1329,12 +1329,13 @@
  *          or false (zero or NULL pointer)
  *
  * @par Values
- *    - true - use "rport" parameter (default)
- *    - false - do not use "rport" parameterx
+ *    - 2 - add "rport" parameter even if was not present in request
+ *    - 1 - use "rport" parameter (default)
+ *    - 0 - do not use "rport" parameter
  *
  * @sa @RFC3581, NTATAG_CLIENT_RPORT(), NTATAG_TCP_RPORT(), @Via
  */
-tag_typedef_t ntatag_server_rport = UINTTAG_TYPEDEF(server_rport);
+tag_typedef_t ntatag_server_rport = INTTAG_TYPEDEF(server_rport);
 
 
 /**@def NTATAG_TCP_RPORT(x)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tag.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tag.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tag.h	Tue Aug 12 13:03:42 2008
@@ -358,10 +358,10 @@
 #define NTATAG_RPORT_REF(x) ntatag_client_rport_ref, tag_bool_vr(&(x))
 
 NTA_DLL extern tag_typedef_t ntatag_server_rport;
-#define NTATAG_SERVER_RPORT(x) ntatag_server_rport, tag_uint_v((x))
+#define NTATAG_SERVER_RPORT(x) ntatag_server_rport, tag_int_v((x))
 
 NTA_DLL extern tag_typedef_t ntatag_server_rport_ref;
-#define NTATAG_SERVER_RPORT_REF(x) ntatag_server_rport_ref, tag_uint_vr(&(x))
+#define NTATAG_SERVER_RPORT_REF(x) ntatag_server_rport_ref, tag_int_vr(&(x))
 
 NTA_DLL extern tag_typedef_t ntatag_tcp_rport;
 #define NTATAG_TCP_RPORT(x) ntatag_tcp_rport, tag_bool_v((x))



More information about the Freeswitch-svn mailing list