Commit 2ad2d4a1 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

When entering foreground, refresh registers if default proxy config is in failed state

parent 1771b790
......@@ -146,10 +146,19 @@ void CorePrivate::notifyEnteringBackground () {
void CorePrivate::notifyEnteringForeground () {
if (!isInBackground)
isInBackground = false;
LinphoneCore *lc = L_GET_C_BACK_PTR(q);
LinphoneProxyConfig *lpc = linphone_core_get_default_proxy_config(lc);
if (lpc && linphone_proxy_config_get_state(lpc) == LinphoneRegistrationFailed) {
// This is to ensure an app bring to foreground that isn't registered correctly will try to fix that and not show a red registration dot to the user
auto listenersCopy = listeners; // Allow removable of a listener in its own call
for (const auto &listener : listenersCopy)
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