Ignore:
Timestamp:
Dec 24, 2015 12:25:58 PM (8 years ago)
Author:
nanang
Message:

Misc (re #1882): Fixed bug STUN still being used in media transport UDP & ICE after STUN is disabled in account config (media_stun_use == PJSUA_STUN_USE_DISABLED).

File:
1 edited

Legend:

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

    r5205 r5217  
    254254 
    255255    /* Make sure STUN server resolution has completed */ 
    256     if (!use_ipv6 && pjsua_sip_acc_is_using_stun(call_med->call->acc_id)) { 
     256    if (!use_ipv6 && pjsua_media_acc_is_using_stun(call_med->call->acc_id)) { 
    257257        status = resolve_stun_server(PJ_TRUE); 
    258258        if (status != PJ_SUCCESS) { 
     
    351351         * and make sure that the mapped RTCP port is adjacent with the RTP. 
    352352         */ 
    353         if (!use_ipv6 && pjsua_sip_acc_is_using_stun(call_med->call->acc_id) && 
     353        if (!use_ipv6 && 
     354            pjsua_media_acc_is_using_stun(call_med->call->acc_id) && 
    354355            pjsua_var.stun_srv.addr.sa_family != 0) 
    355356        { 
     
    748749 
    749750    /* Make sure STUN server resolution has completed */ 
    750     status = resolve_stun_server(PJ_TRUE); 
    751     if (status != PJ_SUCCESS) { 
    752         pjsua_perror(THIS_FILE, "Error resolving STUN server", status); 
    753         return status; 
     751    if (pjsua_media_acc_is_using_stun(call_med->call->acc_id)) { 
     752        status = resolve_stun_server(PJ_TRUE); 
     753        if (status != PJ_SUCCESS) { 
     754            pjsua_perror(THIS_FILE, "Error resolving STUN server", status); 
     755            return status; 
     756        } 
    754757    } 
    755758 
     
    766769 
    767770    /* Configure STUN settings */ 
    768     if (pj_sockaddr_has_addr(&pjsua_var.stun_srv)) { 
     771    if (pj_sockaddr_has_addr(&pjsua_var.stun_srv) && 
     772        pjsua_media_acc_is_using_stun(call_med->call->acc_id)) 
     773    { 
    769774        pj_sockaddr_print(&pjsua_var.stun_srv, stunip, sizeof(stunip), 0); 
    770775        ice_cfg.stun.server = pj_str(stunip); 
Note: See TracChangeset for help on using the changeset viewer.