Commit f51f2868 authored by jehan's avatar jehan
Browse files

make sure subscription are not sent if linphonecore is not ready

parent 3d30286f
......@@ -615,11 +615,16 @@ void linphone_friend_save(LinphoneFriend *fr, LinphoneCore *lc) {
void linphone_friend_apply(LinphoneFriend *fr, LinphoneCore *lc) {
LinphonePresenceModel *model;
if (!fr->uri) {
ms_warning("No sip url defined.");
return;
}
if (!linphone_core_ready(lc)) {
/* lc not ready, deffering subscription */
fr->commit=TRUE;
return;
}
if (fr->inc_subscribe_pending) {
switch(fr->pol) {
......@@ -693,8 +698,6 @@ void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *lf) {
lc->subscribers = ms_list_remove(lc->subscribers, lf);
linphone_friend_unref(lf);
}
if (linphone_core_ready(lc)) linphone_friend_apply(lf, lc);
else lf->commit = TRUE;
}
void linphone_core_remove_friend(LinphoneCore *lc, LinphoneFriend *lf) {
......
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