mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 08:39:20 +00:00
optimize always & ever
This commit is contained in:
parent
5f98187202
commit
ec7fd6f617
1 changed files with 11 additions and 3 deletions
|
|
@ -499,13 +499,21 @@ static LinphoneFriendListStatus _linphone_friend_list_add_friend(LinphoneFriendL
|
|||
return status;
|
||||
}
|
||||
addr = linphone_friend_get_address(lf);
|
||||
bool_t present_in_map= FALSE;
|
||||
bool_t present= FALSE;
|
||||
if (lf->refkey) {
|
||||
if(linphone_friend_list_find_friend_by_ref_key(list, lf->refkey)) {
|
||||
present_in_map = TRUE;
|
||||
present = TRUE;
|
||||
} else {
|
||||
present = FALSE;
|
||||
}
|
||||
} else {
|
||||
if (bctbx_list_find(list->friends, lf) != NULL) {
|
||||
present = TRUE;
|
||||
} else {
|
||||
present = FALSE;
|
||||
}
|
||||
}
|
||||
if (present_in_map || bctbx_list_find(list->friends, lf) != NULL) {
|
||||
if (present) {
|
||||
char *tmp = NULL;
|
||||
if (addr) tmp = linphone_address_as_string(addr);
|
||||
ms_warning("Friend %s already in list [%s], ignored.", tmp ? tmp : "unknown", list->display_name);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue