fix problem with unavaild sip address

This commit is contained in:
Danmei Chen 2019-03-19 10:28:36 +01:00
parent b86f534c22
commit b94f43be03

View file

@ -189,7 +189,9 @@ static UICompositeViewDescription *compositeDescription = nil;
const LinphoneAddress *addr = linphone_call_log_get_remote_address(callLog);
char *lAddress = linphone_address_as_string_uri_only(addr);
if (lAddress != NULL) {
[ContactSelection setAddAddress:[NSString stringWithUTF8String:lAddress]];
NSString *normSip = [NSString stringWithUTF8String:lAddress];
normSip = [normSip hasPrefix:@"sip:"] ? [normSip substringFromIndex:4] : normSip;
[ContactSelection setAddAddress:normSip];
[ContactSelection setSelectionMode:ContactSelectionModeEdit];
[ContactSelection setSipFilter:nil];