Ignore:
Timestamp:
Jul 6, 2015 8:51:45 AM (6 years ago)
Author:
nanang
Message:

Close #1865: Start NAT type detection after first STUN server resolution succeeds to avoid blocked main thread when STUN server is down.

File:
1 edited

Legend:

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

    r4957 r5127  
    14641464    if ((result->status == PJ_SUCCESS) && (pjsua_var.ua_cfg.stun_srv_cnt>0)) { 
    14651465        pj_memcpy(&pjsua_var.stun_srv, &result->addr, sizeof(result->addr)); 
     1466 
     1467        /* Perform NAT type detection if not yet */ 
     1468        if (pjsua_var.nat_type == PJ_STUN_NAT_TYPE_UNKNOWN && 
     1469            pjsua_var.ua_cfg.nat_type_in_sdp) 
     1470        { 
     1471            pjsua_detect_nat_type(); 
     1472        } 
    14661473    } 
    14671474} 
Note: See TracChangeset for help on using the changeset viewer.