]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Tue Mar 3 07:56:30 CST 2009 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Tue, 3 Mar 2009 17:19:09 +0000 (17:19 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 3 Mar 2009 17:19:09 +0000 (17:19 +0000)
  * tport.c: add TPTAG_LOG() and TPTAG_DUMP() to tport_get_params()

  Fixed return value from tport_set_params(), too.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12374 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c
libs/sofia-sip/libsofia-sip-ua/tport/tport.c

index 5fde8a975e2f1616f9780fba3fac1b66cd99ec30..6392e256547adcd1f16e55183f4521131de3da0a 100644 (file)
@@ -1 +1 @@
-Thu Feb 26 12:40:06 CST 2009
+Tue Mar  3 11:18:41 CST 2009
index 4a11ab663c0e1049a0797371a9302702c5dc85b5..1db30273862a8cd2ead5fbedff572f660ba93283 100644 (file)
@@ -472,6 +472,7 @@ static int init_test(tp_test_t *tt)
   tp_name_t const *tpn;
   tport_t *tp;
   unsigned idle;
+  int logging = -1;
 
   BEGIN();
 
@@ -552,6 +553,15 @@ static int init_test(tp_test_t *tt)
                        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 @@ static int tls_test(tp_test_t *tt)
   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 */
index dac6485ef8203e2a210ff019da53d178bd8bbab7..3940b5ef6ac4523c54b241e77f2c6358a1032d27 100644 (file)
@@ -1196,6 +1196,7 @@ int tport_get_params(tport_t const *self,
   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 @@ int tport_get_params(tport_t const *self,
                      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 @@ int tport_set_params(tport_t *self,
   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) {