From e53bd7f811fac785d14b27dfe16b3ddb2dec1d25 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 24 Jun 2013 18:01:39 +0200 Subject: [PATCH] Do not check equality of presence statuses because it does not work if the presence model of linphone core has been changed instead of a new one created. --- coreapi/linphonecore.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 87a57c7a6..9d1121c60 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3702,15 +3702,16 @@ void linphone_core_set_presence_model(LinphoneCore *lc, int minutes_away, const lc->alt_contact=NULL; } if (contact) lc->alt_contact=ms_strdup(contact); - if (!linphone_presence_model_equals(lc->presence_model,presence)){ - linphone_core_notify_all_friends(lc,presence); - /* - Improve the use of all LINPHONE_STATUS available. - !TODO Do not mix "presence status" with "answer status code".. - Use correct parameter to follow sip_if_match/sip_etag. - */ - linphone_core_send_publish(lc,presence); - } + + // TODO: Check that the presence timestamp is newer than the last sent presence. + linphone_core_notify_all_friends(lc,presence); + /* + Improve the use of all LINPHONE_STATUS available. + !TODO Do not mix "presence status" with "answer status code".. + Use correct parameter to follow sip_if_match/sip_etag. + */ + linphone_core_send_publish(lc,presence); + if ((lc->presence_model != NULL) && (lc->presence_model != presence)) { linphone_presence_model_delete(lc->presence_model); lc->presence_model = presence;