mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-18 04:38:27 +00:00
[will be removed] keep push when app will terminate
This commit is contained in:
parent
601dda0508
commit
637f678bd8
1 changed files with 18 additions and 0 deletions
|
|
@ -304,6 +304,24 @@
|
||||||
LinphoneManager.instance.conf = TRUE;
|
LinphoneManager.instance.conf = TRUE;
|
||||||
linphone_core_terminate_all_calls(LC);
|
linphone_core_terminate_all_calls(LC);
|
||||||
|
|
||||||
|
// !!! Will be removed after push notification job finished
|
||||||
|
// destroyLinphoneCore automatically unregister proxies but if we are using
|
||||||
|
// remote push notifications, we want to continue receiving them
|
||||||
|
if (LinphoneManager.instance.pushNotificationToken != nil) {
|
||||||
|
// trick me! setting network reachable to false will avoid sending unregister
|
||||||
|
const MSList *proxies = linphone_core_get_proxy_config_list(LC);
|
||||||
|
BOOL pushNotifEnabled = NO;
|
||||||
|
while (proxies) {
|
||||||
|
const char *refkey = linphone_proxy_config_get_ref_key(proxies->data);
|
||||||
|
pushNotifEnabled = pushNotifEnabled || (refkey && strcmp(refkey, "push_notification") == 0);
|
||||||
|
proxies = proxies->next;
|
||||||
|
}
|
||||||
|
// but we only want to hack if at least one proxy config uses remote push..
|
||||||
|
if (pushNotifEnabled) {
|
||||||
|
linphone_core_set_network_reachable(LC, FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[LinphoneManager.instance destroyLinphoneCore];
|
[LinphoneManager.instance destroyLinphoneCore];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue