Commit d5e1b7ec authored by Simon Morlat's avatar Simon Morlat

Fix ICE settings (stun must be activated when ICE is)

Fix small memory leak.
parent 2fecb073
......@@ -105,6 +105,7 @@ static int sorted_history_comparison(LinphoneChatRoom *to_insert, LinphoneChatRo
}
- (void)loadData {
if (_data) bctbx_list_free(_data);
_data = [self sortChatRooms];
[super loadData];
......
......@@ -491,7 +491,7 @@
BOOL use_avpf = [self boolForKey:@"account_avpf_preference"];
BOOL is_default = [self boolForKey:@"account_is_default_preference"];
BOOL is_enabled = [self boolForKey:@"account_is_enabled_preference"];
BOOL use_ise = [self boolForKey:@"account_ice_preference"];
BOOL use_ice = [self boolForKey:@"account_ice_preference"];
NSString *stun_preference = [self stringForKey:@"account_stun_preference"];
if (username && [username length] > 0 && domain && [domain length] > 0) {
......@@ -568,7 +568,8 @@
}
LinphoneNatPolicy *policy = linphone_proxy_config_get_nat_policy(proxyCfg) ?: linphone_core_create_nat_policy(LC);
linphone_nat_policy_enable_ice(policy, use_ise);
linphone_nat_policy_enable_stun(policy, use_ice); /*we always use STUN with ICE*/
linphone_nat_policy_enable_ice(policy, use_ice);
linphone_nat_policy_set_stun_server(policy, stun_preference.UTF8String);
linphone_proxy_config_set_nat_policy(proxyCfg, policy);
......
......@@ -1959,7 +1959,7 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat
linphone_core_cbs_set_call_encryption_changed(cbs, linphone_iphone_call_encryption_changed);
linphone_core_cbs_set_chat_room_state_changed(cbs, linphone_iphone_chatroom_state_changed);
linphone_core_cbs_set_user_data(cbs, (__bridge void *)(self));
theLinphoneCore = linphone_factory_create_core_with_config(factory, cbs, _configDb);
// Let the core handle cbs
linphone_core_cbs_unref(cbs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment