fix incoming imdn message mgt

This commit is contained in:
Jehan Monnier 2018-02-23 10:10:59 +01:00
parent 9903c98ed8
commit a93537c802
5 changed files with 17 additions and 6 deletions

View file

@ -751,7 +751,10 @@ void on_chat_room_chat_message_received(LinphoneChatRoom *cr, const LinphoneEven
LinphoneChatMessage *chat = linphone_event_log_get_chat_message(event_log);
if (!chat)
return;
if (!linphone_chat_message_is_file_transfer(chat) && !linphone_chat_message_is_text(chat)) /*probably an imdn*/
return;
const LinphoneAddress *from = linphone_chat_message_get_from_address(chat);
if (!from)
return;

View file

@ -2143,8 +2143,8 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
LOGW(@"Call cannot be paused any more, too late");
[[UIApplication sharedApplication] endBackgroundTask:pausedCallBgTask];
}];
LOGI(@"Long running task started, remaining [%g s] because at least one call is paused",
[[UIApplication sharedApplication] backgroundTimeRemaining]);
LOGI(@"Long running task started, remaining [%@ s] because at least one call is paused",
[LinphoneUtils intervalToString:[[UIApplication sharedApplication] backgroundTimeRemaining]]);
}
- (void)startPushLongRunningTask:(NSString *)loc_key callId:(NSString *)callId {
@ -2177,8 +2177,8 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
[[UIApplication sharedApplication] endBackgroundTask:pushBgTaskMsg];
pushBgTaskMsg = 0;
}];
LOGI(@"Message long running task started for call-id [%@], remaining [%g s] because a push has been received",
callId, [[UIApplication sharedApplication] backgroundTimeRemaining]);
LOGI(@"Message long running task started for call-id [%@], remaining [%@ s] because a push has been received",
callId, [LinphoneUtils intervalToString:[[UIApplication sharedApplication] backgroundTimeRemaining]]);
} else if ([loc_key isEqualToString:@"IC_MSG"]) {
[[UIApplication sharedApplication] endBackgroundTask:pushBgTaskCall];
pushBgTaskCall = 0;

View file

@ -47,6 +47,7 @@ typedef enum {
+ (UIImage *)selfAvatar;
+ (NSString *)durationToString:(int)duration;
+ (NSString *)intervalToString:(NSTimeInterval)interval ;
@end

View file

@ -1,3 +1,4 @@
/* Utils.m
*
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
@ -72,6 +73,12 @@
return [result stringByAppendingString:[NSString stringWithFormat:@"%02i:%02i", (duration / 60), (duration % 60)]];
}
+ (NSString *) intervalToString:(NSTimeInterval)interval {
NSDateComponentsFormatter *formatter = [[NSDateComponentsFormatter alloc] init];
formatter.allowedUnits = NSCalendarUnitSecond;
return [formatter stringFromTimeInterval:interval];
}
+ (NSString *)timeToString:(time_t)time withFormat:(LinphoneDateFormat)format {
NSString *formatstr;
NSDate *todayDate = [[NSDate alloc] init];

@ -1 +1 @@
Subproject commit fbdca469c73c07fe07b4129950274120ccc5979a
Subproject commit 6da095454c91f0e7bf2c67fcfda965a4f2a681cc