[Freeswitch-trunk] [commit] r12374 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/tport

FreeSWITCH SVN mikej at freeswitch.org
Tue Mar 3 09:19:09 PST 2009


Author: mikej
Date: Tue Mar  3 11:19:09 2009
New Revision: 12374

Log:
Tue Mar  3 07:56:30 CST 2009  Pekka Pessi <first.last at nokia.com>
  * tport.c: add TPTAG_LOG() and TPTAG_DUMP() to tport_get_params()
  
  Fixed return value from tport_set_params(), too.



Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c

Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Tue Mar  3 11:19:09 2009
@@ -1 +1 @@
-Thu Feb 26 12:40:06 CST 2009
+Tue Mar  3 11:18:41 CST 2009

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c	Tue Mar  3 11:19:09 2009
@@ -472,6 +472,7 @@
   tp_name_t const *tpn;
   tport_t *tp;
   unsigned idle;
+  int logging = -1;
 
   BEGIN();
 
@@ -552,6 +553,15 @@
 			TPTAG_IDLE_REF(idle),
 			TAG_END()), 1);
 
+  /* Check that logging tag works */
+  TEST(tport_get_params(tt->tt_srv_tports,
+			TPTAG_LOG_REF(logging),
+			TAG_END()), 1);
+  TEST(tport_set_params(tt->tt_srv_tports,
+			TPTAG_LOG(logging),
+			TAG_END()), 1);
+
+
   for (tp = tport_primaries(tt->tt_srv_tports); tp; tp = tport_next(tp))
     TEST_S(tport_name(tp)->tpn_ident, "server");
 
@@ -1298,6 +1308,7 @@
   TEST_1(pending_client_close > 0);
   tp = tt->tt_rtport;
   pending_server_close = tport_pend(tp, NULL, server_closed_callback, NULL);
+
   TEST_1(pending_server_close > 0);
 
   /* Send a largish message */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c	Tue Mar  3 11:19:09 2009
@@ -1196,6 +1196,7 @@
   int n;
   tport_params_t const *tpp;
   int connect;
+  tport_master_t *mr = self->tp_master;
 
   if (self == NULL)
     return su_seterrno(EINVAL);
@@ -1227,6 +1228,10 @@
 		      TPTAG_PUBLIC(self->tp_pri ?
 				   self->tp_pri->pri_public : 0)),
 	       TPTAG_TOS(tpp->tpp_tos),
+	       TAG_IF((void *)self == (void *)mr,
+		      TPTAG_LOG(mr->mr_log != 0)),
+	       TAG_IF((void *)self == (void *)mr,
+		      TPTAG_DUMP(mr->mr_dump)),
 	       TAG_END());
 
   ta_end(ta);
@@ -1321,7 +1326,7 @@
   tpp->tpp_pong2ping = pong2ping;
 
   if (memcmp(tpp0, tpp, sizeof tpp) == 0)
-    return n;
+    return n + m;
 
   if (tport_is_secondary(self) &&
       self->tp_params == self->tp_pri->pri_primary->tp_params) {



More information about the Freeswitch-trunk mailing list