Commit 146ad289 authored by jehan's avatar jehan

make default rls uri fully dynamic

parent 6ffb8dbd
......@@ -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);
}
......
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