mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
fix a crash in case of trace issued by the SIP publish
This commit is contained in:
parent
be2b046a17
commit
aedf7bfa4a
1 changed files with 1 additions and 12 deletions
|
|
@ -529,24 +529,13 @@ void linphone_iphone_log_handler(int lev, const char *fmt, va_list args){
|
|||
NSString* format = [[NSString alloc] initWithUTF8String:fmt];
|
||||
NSString* formatedString = [[NSString alloc] initWithFormat:format arguments:args];
|
||||
//since \r are interpreted like \n, avoid double new lines when logging packets
|
||||
NSLogv([formatedString stringByReplacingOccurrencesOfString:@"\r\n" withString:@"\n"], nil);
|
||||
NSLog([formatedString stringByReplacingOccurrencesOfString:@"\r\n" withString:@"\n"], nil);
|
||||
}
|
||||
|
||||
//Error/warning log handler
|
||||
static void linphone_iphone_log(struct _LinphoneCore * lc, const char * message) {
|
||||
NSString* log = [NSString stringWithCString:message encoding:[NSString defaultCStringEncoding]];
|
||||
NSLog(log, NULL);
|
||||
|
||||
// dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// if([[LinphoneManager instance].logs count] >= LINPHONE_LOGS_MAX_ENTRY) {
|
||||
// [[LinphoneManager instance].logs removeObjectAtIndex:0];
|
||||
// }
|
||||
// [[LinphoneManager instance].logs addObject:log];
|
||||
//
|
||||
// // Post event
|
||||
// NSDictionary *dict = [NSDictionary dictionaryWithObject:log forKey:@"log"];
|
||||
// [[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneLogsUpdate object:[LinphoneManager instance] userInfo:dict];
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue