mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
make default rls uri fully dynamic
This commit is contained in:
parent
6ffb8dbd31
commit
146ad28960
2 changed files with 13 additions and 4 deletions
|
|
@ -459,8 +459,20 @@ const LinphoneAddress * linphone_friend_list_get_rls_address(const LinphoneFrien
|
|||
const LinphoneAddress * _linphone_friend_list_get_rls_address(const LinphoneFriendList *list) {
|
||||
if (list->rls_addr)
|
||||
return list->rls_addr;
|
||||
else if (list->lc)
|
||||
else if (list->lc) {
|
||||
const char* rls_uri = lp_config_get_string(list->lc->config, "sip", "rls_uri", NULL);
|
||||
if (list->lc->default_rls_addr)
|
||||
linphone_address_unref(list->lc->default_rls_addr);
|
||||
|
||||
list->lc->default_rls_addr=NULL;
|
||||
|
||||
if (rls_uri) {
|
||||
/*to make sure changes in config are used if any*/
|
||||
list->lc->default_rls_addr = linphone_address_new(rls_uri);
|
||||
}
|
||||
|
||||
return list->lc->default_rls_addr;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1353,9 +1353,6 @@ static void sip_config_read(LinphoneCore *lc) {
|
|||
linphone_core_set_sip_transport_timeout(lc, lp_config_get_int(lc->config, "sip", "transport_timeout", 63000));
|
||||
sal_set_supported_tags(lc->sal,lp_config_get_string(lc->config,"sip","supported","replaces, outbound"));
|
||||
lc->sip_conf.save_auth_info = lp_config_get_int(lc->config, "sip", "save_auth_info", 1);
|
||||
if (lp_config_get_string(lc->config, "sip", "rls_uri", NULL))
|
||||
lc->default_rls_addr = linphone_address_new(lp_config_get_string(lc->config, "sip", "rls_uri", NULL));
|
||||
|
||||
linphone_core_create_im_notif_policy(lc);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue