Changeset 5322


Ignore:
Timestamp:
May 26, 2016 6:03:43 AM (8 years ago)
Author:
ming
Message:

Re #1921: Fixed wrong checks in determining IPv6 transport types

Location:
pjproject/trunk/pjsip/src/pjsua-lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r5311 r5322  
    20122012        if (/*pjsua_var.stun_srv.ipv4.sin_family == 0 ||*/ 
    20132013            acc->cfg.ka_interval == 0 || 
    2014             (param->rdata->tp_info.transport->key.type & PJSIP_TRANSPORT_UDP)!= 
    2015              PJSIP_TRANSPORT_UDP) 
     2014            (param->rdata->tp_info.transport->key.type &   
     2015             ~PJSIP_TRANSPORT_IPV6)!= PJSIP_TRANSPORT_UDP) 
    20162016        { 
    20172017            /* Keep alive is not necessary */ 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c

    r5311 r5322  
    24492449    PJSUA_LOCK(); 
    24502450 
    2451     if ((t->type & PJSIP_TRANSPORT_UDP) == PJSIP_TRANSPORT_UDP) { 
     2451    if ((t->type & ~PJSIP_TRANSPORT_IPV6) == PJSIP_TRANSPORT_UDP) { 
    24522452 
    24532453        pjsip_transport *tp = t->data.tp; 
     
    24702470        status = PJ_SUCCESS; 
    24712471 
    2472     } else if ((t->type & PJSIP_TRANSPORT_TCP) == PJSIP_TRANSPORT_TCP || 
    2473                (t->type & PJSIP_TRANSPORT_TLS) == PJSIP_TRANSPORT_TLS) 
     2472    } else if ((t->type & ~PJSIP_TRANSPORT_IPV6) == PJSIP_TRANSPORT_TCP || 
     2473               (t->type & ~PJSIP_TRANSPORT_IPV6) == PJSIP_TRANSPORT_TLS) 
    24742474    { 
    24752475 
Note: See TracChangeset for help on using the changeset viewer.