mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
To avoid possible race condition, reload contacts in the global state change callbacks
This commit is contained in:
parent
e0b45807fc
commit
0c0e04d7d2
1 changed files with 5 additions and 2 deletions
|
|
@ -624,6 +624,11 @@ static void linphone_iphone_global_state_changed(LinphoneCore *lc, LinphoneGloba
|
|||
if (theLinphoneCore && linphone_core_get_global_state(theLinphoneCore) != LinphoneGlobalOff)
|
||||
[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneGlobalStateUpdate object:self userInfo:dict];
|
||||
});
|
||||
|
||||
if (state == LinphoneGlobalOn) {
|
||||
// reload friends
|
||||
[self.fastAddressBook fetchContactsInBackGroundThread];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)globalStateChangedNotificationHandler:(NSNotification *)notif {
|
||||
|
|
@ -1473,8 +1478,6 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat
|
|||
- (void)resetLinphoneCore {
|
||||
[self destroyLinphoneCore];
|
||||
[self createLinphoneCore];
|
||||
// reload friends
|
||||
[self.fastAddressBook fetchContactsInBackGroundThread];
|
||||
}
|
||||
|
||||
static int comp_call_id(const LinphoneCall *call, const char *callid) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue