Ignore:
Timestamp:
Jul 26, 2019 5:40:42 AM (4 years ago)
Author:
nanang
Message:

Fix #2216: reverted back changes in ticket #2198: r6025, r5998, r5995.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r6035 r6044  
    12551255{ 
    12561256    pjsua_transport_id transport_id = -1; 
    1257     pjsua_transport_id udp6_tp_id = -1, tcp6_tp_id = -1, tls6_tp_id = -1; 
    12581257    pjsua_transport_config tcp_cfg; 
    12591258    unsigned i; 
     
    12841283        return status; 
    12851284    } 
    1286      
    1287     if (app_config.ipv6) 
    1288         app_config.cfg.stun_try_ipv6 = PJ_TRUE; 
    12891285 
    12901286    /* Initialize application callbacks */ 
     
    16131609        if (status != PJ_SUCCESS) 
    16141610            goto on_error; 
    1615         udp6_tp_id = transport_id; 
    16161611 
    16171612        /* Add local account */ 
     
    16791674        if (status != PJ_SUCCESS) 
    16801675            goto on_error; 
    1681         tcp6_tp_id = transport_id; 
    16821676 
    16831677        /* Add local account */ 
     
    17191713        if (status != PJ_SUCCESS) 
    17201714            goto on_error; 
    1721         tls6_tp_id = transport_id; 
    17221715         
    17231716        /* Add local account */ 
     
    17821775        app_config.acc_cfg[i].reg_retry_interval = 300; 
    17831776        app_config.acc_cfg[i].reg_first_retry_interval = 60; 
    1784         if (app_config.ipv6) { 
    1785             pj_str_t *dst_uri = NULL; 
    1786             pj_str_t tmp; 
    1787             pjsip_uri *uri; 
    1788  
    1789             // Uncomment this for testing in a NAT64 network 
    1790             // app_config.acc_cfg[i].nat64_opt = PJSUA_NAT64_ENABLED; 
    1791             app_config.acc_cfg[i].ipv6_media_use = PJSUA_IPV6_ENABLED; 
    1792  
    1793             if ((app_config.cfg.outbound_proxy_cnt > 0) && 
    1794                 (app_config.acc_cfg[i].reg_use_proxy == 1 /* outbound */ || 
    1795                  app_config.acc_cfg[i].reg_use_proxy == 3 /* all */)) 
    1796             { 
    1797                 dst_uri = &app_config.cfg.outbound_proxy[0]; 
    1798             } else if ((app_config.acc_cfg[i].proxy_cnt > 0) && 
    1799                 (app_config.acc_cfg[i].reg_use_proxy == 2 /* acc */ || 
    1800                  app_config.acc_cfg[i].reg_use_proxy == 3 /* all */)) 
    1801             { 
    1802                 dst_uri = &app_config.acc_cfg[i].proxy[0]; 
    1803             } else if (app_config.acc_cfg[i].reg_uri.slen > 0) { 
    1804                 dst_uri = &app_config.acc_cfg[i].reg_uri; 
    1805             } 
    1806              
    1807             pj_strdup_with_null(app_config.pool, &tmp, dst_uri); 
    1808  
    1809             uri = pjsip_parse_uri(app_config.pool, tmp.ptr, tmp.slen, 0); 
    1810             if (uri != NULL) { 
    1811                 pjsip_sip_uri *sip_uri; 
    1812                 pjsip_transport_type_e tp_type = PJSIP_TRANSPORT_UNSPECIFIED;    
    1813                  
    1814                 sip_uri = (pjsip_sip_uri*)pjsip_uri_get_uri(uri); 
    1815  
    1816                 /* Get transport type of the URI */ 
    1817                 if (PJSIP_URI_SCHEME_IS_SIPS(sip_uri)) { 
    1818                     tp_type = PJSIP_TRANSPORT_TLS; 
    1819                 } else if (sip_uri->transport_param.slen == 0) { 
    1820                     tp_type = PJSIP_TRANSPORT_UDP; 
    1821                 } else { 
    1822                     tp_type = pjsip_transport_get_type_from_name( 
    1823                                   &sip_uri->transport_param); 
    1824                     tp_type &= ~ PJSIP_TRANSPORT_IPV6; 
    1825                 } 
    1826                  
    1827                 if (tp_type == PJSIP_TRANSPORT_UDP) { 
    1828                     app_config.acc_cfg[i].transport_id = udp6_tp_id; 
    1829                 } else if (tp_type == PJSIP_TRANSPORT_TCP) { 
    1830                     app_config.acc_cfg[i].transport_id = tcp6_tp_id; 
    1831                 } else if (tp_type == PJSIP_TRANSPORT_TLS) { 
    1832                     app_config.acc_cfg[i].transport_id = tls6_tp_id; 
    1833                 } 
    1834             } 
    1835         } 
    18361777 
    18371778        app_config_init_video(&app_config.acc_cfg[i]); 
Note: See TracChangeset for help on using the changeset viewer.