Fix discrepancies spotted by analysis

This commit is contained in:
Guillaume BIENKOWSKI 2014-10-27 17:12:49 +01:00
parent 2c67a6c460
commit 24ee727736
9 changed files with 9 additions and 24 deletions

View file

@ -47,6 +47,7 @@
// chatRoom = NULL;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self reloadData];
}

View file

@ -229,6 +229,7 @@ static UICompositeViewDescription *compositeDescription = nil;
}
-(void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
[TUNinePatchCache flushCache]; // will remove any images cache (freeing any cached but unused images)
}

View file

@ -99,6 +99,7 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
}
CFRelease(lDict);
}
CFRelease(personSipAddresses);
return match;
}

View file

@ -383,18 +383,6 @@ static UICompositeViewDescription *compositeDescription = nil;
if(lAddress == NULL)
return;
NSString *displayName = nil;
if(contact != nil) {
displayName = [FastAddressBook getContactDisplayName:contact];
} else {
const char* lDisplayName = linphone_address_get_display_name(addr);
const char* lUserName = linphone_address_get_username(addr);
if (lDisplayName)
displayName = [NSString stringWithUTF8String:lDisplayName];
else if(lUserName)
displayName = [NSString stringWithUTF8String:lUserName];
}
// Go to ChatRoom view
[[PhoneMainView instance] changeCurrentView:[ChatViewController compositeViewDescription]];
ChatRoomViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[ChatRoomViewController compositeViewDescription] push:TRUE], ChatRoomViewController);

View file

@ -27,7 +27,6 @@
@private
UIBackgroundTaskIdentifier bgStartId;
BOOL startedInBackground;
int savedMaxCall;
}
- (void)processRemoteNotification:(NSDictionary*)userInfo;

View file

@ -1954,6 +1954,7 @@ static void audioRouteChangeListenerCallback (
NSData* data = [NSJSONSerialization dataWithJSONObject:appDataDict options:0 error:nil];
NSString* appdataJSON = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
linphone_chat_message_set_appdata(msg, [appdataJSON UTF8String] );
[appdataJSON release];
}
#pragma mark - LPConfig Functions

View file

@ -42,10 +42,10 @@
}
- (void)refreshUI {
NSMutableString *name = [[NSMutableString alloc] initWithString:@"numpad_one_"];
NSString *name = @"numpad_one_";
if ([self voiceMailEnabled]) {
[name appendString:@"voicemail_"];
name = [name stringByAppendingString:@"voicemail_"];
}
[self setImage:[UIImage imageNamed:[name stringByAppendingString:@"default.png"]] forState: UIControlStateNormal];

View file

@ -84,7 +84,6 @@ void RGB2HSL(float r, float g, float b, float* outH, float* outS, float* outL)
h = 0;
s = 0;
l = 0;
v = MAX(r, g);
v = MAX(v, b);

View file

@ -134,16 +134,11 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
addressBook = ABAddressBookCreateWithOptions(NULL, NULL);
if(addressBook != NULL) {
if(ABAddressBookGetAuthorizationStatus) {
ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
ABAddressBookRegisterExternalChangeCallback (addressBook, sync_address_book, self);
[self loadData];
});
} else {
ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
ABAddressBookRegisterExternalChangeCallback (addressBook, sync_address_book, self);
[self loadData];
}
} else {
});
} else {
[LinphoneLogger log:LinphoneLoggerError format:@"Create AddressBook: Fail(%@)", [error localizedDescription]];
}
}