Fix a crash in FastAddressBook with non-breaking utf8 spaces. Possibly needs a rework down in belle-sip

This commit is contained in:
Guillaume BIENKOWSKI 2014-11-19 14:26:20 +01:00
parent e307790d62
commit 4e932d85dd

View file

@ -72,6 +72,8 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
}
+ (NSString*)normalizeSipURI:(NSString*)address {
// replace all whitespaces (non-breakable, utf8 nbsp etc.) by the "classical" whitespace
address = [[address componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] componentsJoinedByString:@" "];
NSString *normalizedSipAddress = nil;
LinphoneAddress* linphoneAddress = linphone_core_interpret_url([LinphoneManager getLc], [address UTF8String]);
if(linphoneAddress != NULL) {