Fix Addressbook when no proxy configured

This commit is contained in:
Yann Diorcet 2012-10-17 15:25:40 +02:00
parent fedcab57fe
commit deaeb795d3
2 changed files with 6 additions and 1 deletions

View file

@ -382,6 +382,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
linphone_core_set_default_proxy(lc,proxyCfg);
}
[[[LinphoneManager instance] fastAddressBook] reload];
}
- (BOOL)synchronize {

View file

@ -188,7 +188,11 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
if(add) {
CFStringRef lValue = CFDictionaryGetValue(lDict, kABPersonInstantMessageUsernameKey);
NSString* lNormalizedKey = [FastAddressBook normalizeSipURI:(NSString*)lValue];
[addressBookMap setObject:lPerson forKey:lNormalizedKey];
if(lNormalizedKey != NULL) {
[addressBookMap setObject:lPerson forKey:lNormalizedKey];
} else {
[addressBookMap setObject:lPerson forKey:(NSString*)lValue];
}
}
CFRelease(lDict);
}