[Freeswitch-svn] [commit] r10818 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nta libsofia-sip-ua/nta/sofia-sip
FreeSWITCH SVN
mikej at freeswitch.org
Tue Dec 16 12:10:32 PST 2008
Author: mikej
Date: Tue Dec 16 15:10:32 2008
New Revision: 10818
Log:
Wed Nov 12 11:30:28 CST 2008 Fabio Ferrari <fabioferrari AT gmail DOT com>
* nta: new tag NTATAG_TLS_RPORT()
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_internal.h
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
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Tue Dec 16 15:10:32 2008
@@ -1 +1 @@
-Tue Dec 16 13:59:44 CST 2008
+Tue Dec 16 14:10:06 CST 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 Dec 16 15:10:32 2008
@@ -361,6 +361,7 @@
* NTATAG_SIP_T1X64(), NTATAG_SIP_T1(), NTATAG_SIP_T2(), NTATAG_SIP_T4(),
* NTATAG_STATELESS(),
* NTATAG_TAG_3261(), NTATAG_TCP_RPORT(), NTATAG_TIMEOUT_408(),
+ * NTATAG_TLS_RPORT(),
* NTATAG_TIMER_C(), NTATAG_MAX_PROCEEDING(),
* NTATAG_UA(), NTATAG_UDP_MTU(), NTATAG_USER_VIA(),
* NTATAG_USE_NAPTR(), NTATAG_USE_SRV() and NTATAG_USE_TIMESTAMP().
@@ -935,6 +936,7 @@
* NTATAG_SIP_T1X64(), NTATAG_SIP_T1(), NTATAG_SIP_T2(), NTATAG_SIP_T4(),
* NTATAG_STATELESS(),
* NTATAG_TAG_3261(), NTATAG_TCP_RPORT(), NTATAG_TIMEOUT_408(),
+ * NTATAG_TLS_RPORT(),
* NTATAG_TIMER_C(), NTATAG_MAX_PROCEEDING(),
* NTATAG_UA(), NTATAG_UDP_MTU(), NTATAG_USER_VIA(),
* NTATAG_USE_NAPTR(), NTATAG_USE_SRV() and NTATAG_USE_TIMESTAMP().
@@ -999,6 +1001,7 @@
int rport = agent->sa_rport;
int server_rport = agent->sa_server_rport;
int tcp_rport = agent->sa_tcp_rport;
+ int tls_rport = agent->sa_tls_rport;
unsigned preload = agent->sa_preload;
unsigned threadpool = agent->sa_tport_threadpool;
char const *sigcomp = agent->sa_sigcomp_options;
@@ -1045,6 +1048,7 @@
#endif
NTATAG_STATELESS_REF(stateless),
NTATAG_TCP_RPORT_REF(tcp_rport),
+ NTATAG_TLS_RPORT_REF(tls_rport),
NTATAG_TIMEOUT_408_REF(timeout_408),
NTATAG_UA_REF(ua),
NTATAG_UDP_MTU_REF(udp_mtu),
@@ -1214,6 +1218,7 @@
agent->sa_flags = flags & MSG_FLG_USERMASK;
agent->sa_rport = rport != 0;
agent->sa_tcp_rport = tcp_rport != 0;
+ agent->sa_tls_rport = tls_rport != 0;
agent->sa_preload = preload;
agent->sa_tport_threadpool = threadpool;
@@ -2064,7 +2069,8 @@
if (!v->v_rport &&
((self->sa_rport && v->v_protocol == sip_transport_udp) ||
- (self->sa_tcp_rport && v->v_protocol == sip_transport_tcp)))
+ (self->sa_tcp_rport && v->v_protocol == sip_transport_tcp) ||
+ (self->sa_tls_rport && v->v_protocol == sip_transport_tls)))
msg_header_add_param(msg_home(msg), v->v_common, "rport");
if (!orq->orq_tpn->tpn_comp)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_internal.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_internal.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_internal.h Tue Dec 16 15:10:32 2008
@@ -229,6 +229,8 @@
unsigned sa_server_rport:2;
/** If true, use rport with tcp, too */
unsigned sa_tcp_rport:1;
+ /** If true, use rport with tls, too */
+ unsigned sa_tls_rport:1;
/** If true, automatically create compartments */
unsigned sa_auto_comp:1;
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 Dec 16 15:10:32 2008
@@ -1298,7 +1298,7 @@
*
* @note The NTATAG_RPORT() is a synonym for this.
*
- * @sa @RFC3581, NTATAG_SERVER_RPORT(), NTATAG_TCP_RPORT(), @Via
+ * @sa @RFC3581, NTATAG_SERVER_RPORT(), NTATAG_TCP_RPORT(), NTATAG_TLS_RPORT(), @Via
*/
tag_typedef_t ntatag_client_rport = BOOLTAG_TYPEDEF(client_rport);
@@ -1333,7 +1333,7 @@
* - 1 - use "rport" parameter (default)
* - 0 - do not use "rport" parameter
*
- * @sa @RFC3581, NTATAG_CLIENT_RPORT(), NTATAG_TCP_RPORT(), @Via
+ * @sa @RFC3581, NTATAG_CLIENT_RPORT(), NTATAG_TCP_RPORT(), NTATAG_TLS_RPORT(), @Via
*/
tag_typedef_t ntatag_server_rport = INTTAG_TYPEDEF(server_rport);
@@ -1358,6 +1358,27 @@
*/
tag_typedef_t ntatag_tcp_rport = BOOLTAG_TYPEDEF(tcp_rport);
+/**@def NTATAG_TLS_RPORT(x)
+ *
+ * Use rport with TLS, too.
+ *
+ * @par Used with
+ * nua_create(), nua_set_params(),
+ * nta_agent_create(), nta_agent_set_params()
+ *
+ * @par Parameter type
+ * boolean: true (non-zero or non-NULL pointer)
+ * or false (zero or NULL pointer)
+ *
+ * @par Values
+ * - true - include rport parameter in the TLS via line on client side
+ * - false - do not include rport parameter in the TLS via line
+ * on client side
+ *
+ * @sa @RFC3581, NTATAG_CLIENT_RPORT(), NTATAG_SERVER_RPORT(), @Via
+ */
+tag_typedef_t ntatag_tls_rport = BOOLTAG_TYPEDEF(tls_rport);
+
/**@def NTATAG_PRELOAD(x)
*
* Preload by N bytes.
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 Dec 16 15:10:32 2008
@@ -369,6 +369,12 @@
NTA_DLL extern tag_typedef_t ntatag_tcp_rport_ref;
#define NTATAG_TCP_RPORT_REF(x) ntatag_tcp_rport_ref, tag_bool_vr(&(x))
+NTA_DLL extern tag_typedef_t ntatag_tls_rport;
+#define NTATAG_TLS_RPORT(x) ntatag_tls_rport, tag_bool_v((x))
+
+NTA_DLL extern tag_typedef_t ntatag_tls_rport_ref;
+#define NTATAG_TLS_RPORT_REF(x) ntatag_tls_rport_ref, tag_bool_vr(&(x))
+
NTA_DLL extern tag_typedef_t ntatag_preload;
#define NTATAG_PRELOAD(x) ntatag_preload, tag_uint_v((x))
More information about the Freeswitch-svn
mailing list