From b095cd233378c96589007a96fc4e2e6c971f5ed9 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Mon, 15 Feb 2016 11:05:23 +0100 Subject: [PATCH] LinphoneManager.m: reconfigure push notifications in case of remote provisioning --- Classes/LinphoneManager.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 43535c922..234d82e36 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -822,6 +822,14 @@ static void linphone_iphone_configuring_status_changed(LinphoneCore *lc, Linphon - (void)configuringStateChangedNotificationHandler:(NSNotification *)notif { _wasRemoteProvisioned = ((LinphoneConfiguringState)[[[notif userInfo] valueForKey:@"state"] integerValue] == LinphoneConfiguringSuccessful); + if (_wasRemoteProvisioned) { + LinphoneProxyConfig *cfg = linphone_core_get_default_proxy_config(LC); + if (cfg) { + linphone_proxy_config_edit(cfg); + [self configurePushTokenForProxyConfig:cfg]; + linphone_proxy_config_done(cfg); + } + } } #pragma mark - Registration State Functions