diff options
author | Liong Sauw Ming <ming@teluu.com> | 2016-05-26 06:03:43 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2016-05-26 06:03:43 +0000 |
commit | 01492c5b38fb6fb44522a95f251c704725c47b5f (patch) | |
tree | 22ee687e788cf495a47a8d2669e1a8b92db805c7 | |
parent | 781b2c7b3fc2ac26b42f6cf6efdf61516d4f9389 (diff) |
Re #1921: Fixed wrong checks in determining IPv6 transport types
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5322 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_acc.c | 4 | ||||
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_core.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c index 055d7ad7..87f14398 100644 --- a/pjsip/src/pjsua-lib/pjsua_acc.c +++ b/pjsip/src/pjsua-lib/pjsua_acc.c @@ -2011,8 +2011,8 @@ static void update_keep_alive(pjsua_acc *acc, pj_bool_t start, */ if (/*pjsua_var.stun_srv.ipv4.sin_family == 0 ||*/ acc->cfg.ka_interval == 0 || - (param->rdata->tp_info.transport->key.type & PJSIP_TRANSPORT_UDP)!= - PJSIP_TRANSPORT_UDP) + (param->rdata->tp_info.transport->key.type & + ~PJSIP_TRANSPORT_IPV6)!= PJSIP_TRANSPORT_UDP) { /* Keep alive is not necessary */ return; diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c index d86013c7..a5dee5a5 100644 --- a/pjsip/src/pjsua-lib/pjsua_core.c +++ b/pjsip/src/pjsua-lib/pjsua_core.c @@ -2448,7 +2448,7 @@ PJ_DEF(pj_status_t) pjsua_transport_get_info( pjsua_transport_id id, PJSUA_LOCK(); - if ((t->type & PJSIP_TRANSPORT_UDP) == PJSIP_TRANSPORT_UDP) { + if ((t->type & ~PJSIP_TRANSPORT_IPV6) == PJSIP_TRANSPORT_UDP) { pjsip_transport *tp = t->data.tp; @@ -2469,8 +2469,8 @@ PJ_DEF(pj_status_t) pjsua_transport_get_info( pjsua_transport_id id, status = PJ_SUCCESS; - } else if ((t->type & PJSIP_TRANSPORT_TCP) == PJSIP_TRANSPORT_TCP || - (t->type & PJSIP_TRANSPORT_TLS) == PJSIP_TRANSPORT_TLS) + } else if ((t->type & ~PJSIP_TRANSPORT_IPV6) == PJSIP_TRANSPORT_TCP || + (t->type & ~PJSIP_TRANSPORT_IPV6) == PJSIP_TRANSPORT_TLS) { pjsip_tpfactory *factory = t->data.factory; |