mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 06:08:07 +00:00
Perform STUN server resolution for all proxy configs when network gets up.
This commit is contained in:
parent
09ae895cd0
commit
aa8bb84d59
1 changed files with 9 additions and 5 deletions
|
|
@ -201,12 +201,16 @@ int linphone_core_get_edge_ptime(LinphoneCore *lc){
|
|||
return edge_ptime;
|
||||
}
|
||||
|
||||
void linphone_core_resolve_stun_server(LinphoneCore *lc){
|
||||
if (lc->nat_policy != NULL) {
|
||||
linphone_nat_policy_resolve_stun_server(lc->nat_policy);
|
||||
} else {
|
||||
ms_error("linphone_core_resolve_stun_server(): called without nat_policy, this should not happen.");
|
||||
void linphone_core_resolve_stun_server(LinphoneCore *lc) {
|
||||
auto proxies = linphone_core_get_proxy_config_list(lc);
|
||||
for (auto item = proxies; item; item = bctbx_list_next(item)) {
|
||||
auto proxy = reinterpret_cast<LinphoneProxyConfig *>(bctbx_list_get_data(item));
|
||||
auto policy = linphone_proxy_config_get_nat_policy(proxy);
|
||||
if (policy)
|
||||
linphone_nat_policy_resolve_stun_server(policy);
|
||||
}
|
||||
if (lc->nat_policy)
|
||||
linphone_nat_policy_resolve_stun_server(lc->nat_policy);
|
||||
}
|
||||
|
||||
const struct addrinfo *linphone_core_get_stun_server_addrinfo(LinphoneCore *lc){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue