Tue Mar 3 07:56:30 CST 2009 Pekka Pessi <first.last@nokia.com>
* 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
This commit is contained in:
parent
52dba90640
commit
094de86372
|
@ -1 +1 @@
|
||||||
Thu Feb 26 12:40:06 CST 2009
|
Tue Mar 3 11:18:41 CST 2009
|
||||||
|
|
|
@ -472,6 +472,7 @@ static int init_test(tp_test_t *tt)
|
||||||
tp_name_t const *tpn;
|
tp_name_t const *tpn;
|
||||||
tport_t *tp;
|
tport_t *tp;
|
||||||
unsigned idle;
|
unsigned idle;
|
||||||
|
int logging = -1;
|
||||||
|
|
||||||
BEGIN();
|
BEGIN();
|
||||||
|
|
||||||
|
@ -552,6 +553,15 @@ static int init_test(tp_test_t *tt)
|
||||||
TPTAG_IDLE_REF(idle),
|
TPTAG_IDLE_REF(idle),
|
||||||
TAG_END()), 1);
|
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))
|
for (tp = tport_primaries(tt->tt_srv_tports); tp; tp = tport_next(tp))
|
||||||
TEST_S(tport_name(tp)->tpn_ident, "server");
|
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);
|
TEST_1(pending_client_close > 0);
|
||||||
tp = tt->tt_rtport;
|
tp = tt->tt_rtport;
|
||||||
pending_server_close = tport_pend(tp, NULL, server_closed_callback, NULL);
|
pending_server_close = tport_pend(tp, NULL, server_closed_callback, NULL);
|
||||||
|
|
||||||
TEST_1(pending_server_close > 0);
|
TEST_1(pending_server_close > 0);
|
||||||
|
|
||||||
/* Send a largish message */
|
/* Send a largish message */
|
||||||
|
|
|
@ -1196,6 +1196,7 @@ int tport_get_params(tport_t const *self,
|
||||||
int n;
|
int n;
|
||||||
tport_params_t const *tpp;
|
tport_params_t const *tpp;
|
||||||
int connect;
|
int connect;
|
||||||
|
tport_master_t *mr = self->tp_master;
|
||||||
|
|
||||||
if (self == NULL)
|
if (self == NULL)
|
||||||
return su_seterrno(EINVAL);
|
return su_seterrno(EINVAL);
|
||||||
|
@ -1227,6 +1228,10 @@ int tport_get_params(tport_t const *self,
|
||||||
TPTAG_PUBLIC(self->tp_pri ?
|
TPTAG_PUBLIC(self->tp_pri ?
|
||||||
self->tp_pri->pri_public : 0)),
|
self->tp_pri->pri_public : 0)),
|
||||||
TPTAG_TOS(tpp->tpp_tos),
|
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());
|
TAG_END());
|
||||||
|
|
||||||
ta_end(ta);
|
ta_end(ta);
|
||||||
|
@ -1321,7 +1326,7 @@ int tport_set_params(tport_t *self,
|
||||||
tpp->tpp_pong2ping = pong2ping;
|
tpp->tpp_pong2ping = pong2ping;
|
||||||
|
|
||||||
if (memcmp(tpp0, tpp, sizeof tpp) == 0)
|
if (memcmp(tpp0, tpp, sizeof tpp) == 0)
|
||||||
return n;
|
return n + m;
|
||||||
|
|
||||||
if (tport_is_secondary(self) &&
|
if (tport_is_secondary(self) &&
|
||||||
self->tp_params == self->tp_pri->pri_primary->tp_params) {
|
self->tp_params == self->tp_pri->pri_primary->tp_params) {
|
||||||
|
|
Loading…
Reference in New Issue