Do not send list subscription when the "use_rls_presence" is set to 0.

This commit is contained in:
Ghislain MARY 2016-09-23 13:50:19 +02:00
parent 1bb3179563
commit e46417d209

View file

@ -785,15 +785,17 @@ void linphone_friend_list_update_subscriptions(LinphoneFriendList *list){
const LinphoneAddress *address = linphone_friend_list_get_rls_address(list);
bool_t only_when_registered = FALSE;
bool_t should_send_list_subscribe = FALSE;
bool_t use_rls_presence = FALSE;
if (list->lc){
if (address)
cfg = linphone_core_lookup_known_proxy(list->lc, address);
only_when_registered = linphone_core_should_subscribe_friends_only_when_registered(list->lc);
should_send_list_subscribe = (!only_when_registered || !cfg || cfg->state == LinphoneRegistrationOk);
use_rls_presence = lp_config_get_int(list->lc->config, "sip", "use_rls_presence", 0);
}
if (list->rls_addr != NULL) {
if (use_rls_presence && (list->rls_addr != NULL)) {
if (list->enable_subscriptions) {
if (should_send_list_subscribe){
linphone_friend_list_send_list_subscription(list);