diff options
author | Riza Sulistyo <riza@teluu.com> | 2016-05-19 04:30:05 +0000 |
---|---|---|
committer | Riza Sulistyo <riza@teluu.com> | 2016-05-19 04:30:05 +0000 |
commit | 68958ad7d2304c6c78ca899ddb09827bcd993891 (patch) | |
tree | 8daac438d6612fcdb0087c0d0283298f530b853e /pjsip/include | |
parent | 75e0e9499ed46428d7b07c7054c2f34f78a54437 (diff) |
Re #1918: Fixed continous looping when trying to resolve STUN server due to lock handling.
Also move the unusable server to the least prioritize to be chosen on the fallback process.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5307 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 4 | ||||
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua_internal.h | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 458ea379..b88aa462 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -2048,6 +2048,10 @@ struct pj_stun_resolve_result */ pj_sockaddr addr; + /** + * The index of the usable STUN server. + */ + unsigned index; }; diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h index 1c4d0a1d..1dec7c57 100644 --- a/pjsip/include/pjsua-lib/pjsua_internal.h +++ b/pjsip/include/pjsua-lib/pjsua_internal.h @@ -435,7 +435,8 @@ struct pjsua_data pj_sockaddr stun_srv; /**< Resolved STUN server address */ pj_status_t stun_status; /**< STUN server status. */ pjsua_stun_resolve stun_res; /**< List of pending STUN resolution*/ - pj_dns_resolver *resolver; /**< DNS resolver. */ + unsigned stun_srv_idx; /**< Resolved STUN server index */ + pj_dns_resolver *resolver; /**< DNS resolver. */ /* Detected NAT type */ pj_stun_nat_type nat_type; /**< NAT type. */ |