mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
make sure subscription are not sent if linphonecore is not ready
This commit is contained in:
parent
3d30286f84
commit
f51f286803
1 changed files with 6 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue