Moved traces for silent push

This commit is contained in:
Guillaume BIENKOWSKI 2014-02-20 09:29:35 +01:00
parent ad7390cd68
commit 132288e8f1
2 changed files with 3 additions and 2 deletions

View file

@ -268,11 +268,12 @@
{
LinphoneManager* lm = [LinphoneManager instance];
[LinphoneLogger log:LinphoneLoggerLog format:@"Silent PushNotification; userInfo %@", userInfo];
// check that linphone is still running
if( ![LinphoneManager isLcReady] )
[lm startLibLinphone];
[LinphoneLogger log:LinphoneLoggerLog format:@"Silent PushNotification; userInfo %@", userInfo];
// save the completion handler for later execution.
// 2 outcomes:
// - if a new call/message is received, the completion handler will be called with "NEWDATA"

View file

@ -1558,8 +1558,8 @@ static void audioRouteChangeListenerCallback (
}
- (void)silentPushFailed:(NSTimer*)timer
{
[LinphoneLogger log:LinphoneLoggerLog format:@"silentPush failed, silentPushCompletion block: %p", silentPushCompletion ];
if( silentPushCompletion ){
[LinphoneLogger log:LinphoneLoggerLog format:@"silentPush failed, silentPushCompletion block: %p", silentPushCompletion ];
silentPushCompletion(UIBackgroundFetchResultNoData);
silentPushCompletion = nil;
}