store ipv6 setting in config immediately

This commit is contained in:
Simon Morlat 2014-11-13 22:39:30 +01:00
parent c0b7ae8359
commit 9816594653
2 changed files with 7 additions and 2 deletions

View file

@ -2300,6 +2300,9 @@ void linphone_core_enable_ipv6(LinphoneCore *lc, bool_t val){
}
/*update the localip immediately for the network monitor to avoid to "discover" later that we switched to ipv6*/
linphone_core_get_local_ip(lc,AF_UNSPEC,NULL,lc->localip);
if (linphone_core_ready(lc)){
lp_config_set_int(lc->config,"sip","use_ipv6",(int)val);
}
}
}

View file

@ -367,10 +367,12 @@ static void direct_call_over_ipv6(){
linphone_core_enable_ipv6(marie->lc,TRUE);
linphone_core_enable_ipv6(pauline->lc,TRUE);
linphone_core_set_default_proxy_config(marie->lc,NULL);
/*wait for register in v6 mode
/*wait for register in v6 mode, however sip2.linphone.org has an ipv6 address but doesn't listen to it*/
#if 0
CU_ASSERT_TRUE(wait_for_until(pauline->lc, NULL, &pauline->stat.number_of_LinphoneRegistrationOk, 2, 2000));
CU_ASSERT_TRUE(wait_for_until(pauline->lc, NULL, &marie->stat.number_of_LinphoneRegistrationOk, 2, 2000));
*/
#endif
linphone_core_get_sip_transports_used(pauline->lc,&pauline_transports);
linphone_address_set_port(pauline_dest,pauline_transports.tcp_port);
linphone_core_invite_address(marie->lc,pauline_dest);