mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
Remove setting registerEnabled to false when registration fails
This commit is contained in:
parent
401c4c048e
commit
fd100e8378
1 changed files with 3 additions and 17 deletions
|
|
@ -318,23 +318,9 @@ class CoreContext: ObservableObject {
|
|||
self.updatePresence(core: self.mCore, presence: ConsolidatedPresence.Online)
|
||||
}
|
||||
case .Cleared:
|
||||
Log.info("[onAccountRegistrationStateChanged] Account \(account.displayName()) registration was cleared. Looking for auth info")
|
||||
// Moved removeAuthInfo to "failed" state to prevent removing auth info when deactivating an account
|
||||
/*
|
||||
if let authInfo = account.findAuthInfo() {
|
||||
Log.info("[onAccountRegistrationStateChanged] Found auth info for account, removing it")
|
||||
core.removeAuthInfo(info: authInfo)
|
||||
} else {
|
||||
Log.warn("[onAccountRegistrationStateChanged] Failed to find matching auth info for account")
|
||||
}
|
||||
*/
|
||||
case .Failed: // If registration failed, remove account from core
|
||||
if self.networkStatusIsConnected {
|
||||
let params = account.params
|
||||
let clonedParams = params?.clone()
|
||||
clonedParams?.registerEnabled = false
|
||||
account.params = clonedParams
|
||||
}
|
||||
Log.info("[CoreContext][onAccountRegistrationStateChanged] Account \(account.displayName()) registration was cleared.")
|
||||
case .Failed:
|
||||
Log.error("[CoreContext][onAccountRegistrationStateChanged] Account \(account.displayName()) registration failed.")
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue