When destroying the linphone core, also destroy the magic search singleton This fixes bugs that would break the LDAP contact search after a remote provisioning.

This commit is contained in:
QuentinArguillere 2022-07-26 16:36:22 +02:00
parent 0c0e04d7d2
commit 9524dfd45f
2 changed files with 5 additions and 0 deletions

View file

@ -1449,6 +1449,7 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat
- (void)destroyLinphoneCore {
// just in case
[self removeCTCallCenterCb];
[MagicSearchSingleton destroyInstance];
if (theLinphoneCore != nil) { // just in case application terminate before linphone core initialization

View file

@ -47,6 +47,10 @@ import linphonesw
return theMagicSearchSingleton!
}
@objc static func destroyInstance() {
theMagicSearchSingleton = nil
}
func getContactFromAddr(addr: Address) -> Contact? {
return LinphoneManager.instance().fastAddressBook.addressBookMap.object(forKey: addr.asStringUriOnly() as Any) as? Contact