forked from mirrors/linphone-iphone
clearer method
This commit is contained in:
parent
27625e5bdf
commit
62195a7208
2 changed files with 17 additions and 19 deletions
|
|
@ -568,7 +568,7 @@
|
|||
}
|
||||
|
||||
LinphoneNatPolicy *policy = linphone_proxy_config_get_nat_policy(proxyCfg) ?: linphone_core_create_nat_policy(LC);
|
||||
linphone_nat_policy_enable_stun(policy, use_ice); /*we always use STUN with ICE*/
|
||||
linphone_nat_policy_enable_stun(policy, use_ice); // We always use STUN with ICE
|
||||
linphone_nat_policy_enable_ice(policy, use_ice);
|
||||
linphone_nat_policy_set_stun_server(policy, stun_preference.UTF8String);
|
||||
linphone_proxy_config_set_nat_policy(proxyCfg, policy);
|
||||
|
|
|
|||
|
|
@ -289,25 +289,23 @@
|
|||
}
|
||||
|
||||
+ (NSString *)displayNameForAddress:(const LinphoneAddress *)addr {
|
||||
NSString *ret = NSLocalizedString(@"Unknown", nil);
|
||||
Contact *contact = [FastAddressBook getContactWithAddress:addr];
|
||||
if (contact) {
|
||||
ret = [FastAddressBook displayNameForContact:contact];
|
||||
} else {
|
||||
LinphoneFriend *friend = linphone_core_find_friend(LC, addr);
|
||||
if (friend) {
|
||||
ret = [NSString stringWithUTF8String:linphone_friend_get_name(friend)];
|
||||
} else {
|
||||
const char *lDisplayName = linphone_address_get_display_name(addr);
|
||||
const char *lUserName = linphone_address_get_username(addr);
|
||||
if (lDisplayName) {
|
||||
ret = [NSString stringWithUTF8String:lDisplayName];
|
||||
} else if (lUserName) {
|
||||
ret = [NSString stringWithUTF8String:lUserName];
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
if (contact)
|
||||
return [FastAddressBook displayNameForContact:contact];
|
||||
|
||||
LinphoneFriend *friend = linphone_core_find_friend(LC, addr);
|
||||
if (friend)
|
||||
return [NSString stringWithUTF8String:linphone_friend_get_name(friend)];
|
||||
|
||||
const char *displayName = linphone_address_get_display_name(addr);
|
||||
if (displayName)
|
||||
return [NSString stringWithUTF8String:displayName];
|
||||
|
||||
const char *userName = linphone_address_get_username(addr);
|
||||
if (userName)
|
||||
return [NSString stringWithUTF8String:userName];
|
||||
|
||||
return NSLocalizedString(@"Unknown", nil);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue