forked from mirrors/linphone-iphone
Fix Addressbook when no proxy configured
This commit is contained in:
parent
fedcab57fe
commit
deaeb795d3
2 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
linphone_core_set_default_proxy(lc,proxyCfg);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
[[[LinphoneManager instance] fastAddressBook] reload];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)synchronize {
|
- (BOOL)synchronize {
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,11 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
||||||
if(add) {
|
if(add) {
|
||||||
CFStringRef lValue = CFDictionaryGetValue(lDict, kABPersonInstantMessageUsernameKey);
|
CFStringRef lValue = CFDictionaryGetValue(lDict, kABPersonInstantMessageUsernameKey);
|
||||||
NSString* lNormalizedKey = [FastAddressBook normalizeSipURI:(NSString*)lValue];
|
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);
|
CFRelease(lDict);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue