diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2015-07-06 08:51:45 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2015-07-06 08:51:45 +0000 |
commit | fb796ac321a427e61e359841e5587ced0d97a937 (patch) | |
tree | d36a784662a20d4afc9d534122075c7b95f16a4e /pjsip/src/pjsua-lib/pjsua_media.c | |
parent | 82c8b2985a57fdcf75720bc2f472dd9db967c6b3 (diff) |
Close #1865: Start NAT type detection after first STUN server resolution succeeds to avoid blocked main thread when STUN server is down.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5127 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_media.c')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_media.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c index 99dc9614..9c70f264 100644 --- a/pjsip/src/pjsua-lib/pjsua_media.c +++ b/pjsip/src/pjsua-lib/pjsua_media.c @@ -164,12 +164,14 @@ pj_status_t pjsua_media_subsys_start(void) #endif /* Perform NAT detection */ - if (pjsua_var.ua_cfg.stun_srv_cnt) { - status = pjsua_detect_nat_type(); - if (status != PJ_SUCCESS) { - PJ_PERROR(1,(THIS_FILE, status, "NAT type detection failed")); - } - } + // Performed only when STUN server resolution by pjsua_init() completed + // successfully (see ticket #1865). + //if (pjsua_var.ua_cfg.stun_srv_cnt) { + //status = pjsua_detect_nat_type(); + //if (status != PJ_SUCCESS) { + // PJ_PERROR(1,(THIS_FILE, status, "NAT type detection failed")); + //} + //} pj_log_pop_indent(); return PJ_SUCCESS; |