diff --git a/src/account/account.cpp b/src/account/account.cpp index 28afcef7f9d8a72a6df4000f073a2d8b8f9370d7..e2bd7a8b8e9ecd0bc801618e4eef207ee99fde27 100644 --- a/src/account/account.cpp +++ b/src/account/account.cpp @@ -633,13 +633,11 @@ std::shared_ptr<Address> Account::guessContactForRegister() { lError() << "Couldn't compute automatic push notifications parameters on " << *this << " because account params do not have available push notifications"; } else if (newParams->mPushNotificationAllowed || newParams->mRemotePushNotificationAllowed) { - if (newParams->mPushNotificationConfig->getProvider().empty()) { - bool tester_env = !!linphone_config_get_int(core->config, "tester", "test_env", FALSE); - if (tester_env) newParams->mPushNotificationConfig->setProvider("liblinphone_tester"); + bool tester_env = !!linphone_config_get_int(core->config, "tester", "test_env", FALSE); + if (tester_env) newParams->mPushNotificationConfig->setProvider("liblinphone_tester"); #if TARGET_OS_IPHONE - if (tester_env) newParams->mPushNotificationConfig->setProvider("apns.dev"); + if (tester_env) newParams->mPushNotificationConfig->setProvider("apns.dev"); #endif - } newParams->mPushNotificationConfig->generatePushParams(newParams->mPushNotificationAllowed, newParams->mRemotePushNotificationAllowed); successfullyPreparedPushParameters = true;