mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
avoid useless uri parsing when no presence model found for a friend
This commit is contained in:
parent
91c0fc4a17
commit
9b236e535d
1 changed files with 5 additions and 1 deletions
|
|
@ -115,7 +115,11 @@ static LinphoneFriendPresence * find_presence_model_for_uri_or_tel(const Linphon
|
||||||
ms_warning("Cannot find uri of tel [%s] from friend [%p] because not associated to any Linphone core object",uri_or_tel,lf);
|
ms_warning("Cannot find uri of tel [%s] from friend [%p] because not associated to any Linphone core object",uri_or_tel,lf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
iterator = lf->presence_models;
|
if ((iterator = lf->presence_models) == NULL) {
|
||||||
|
/*no need to move forward, just reutn to avoid useless uri parsing*/
|
||||||
|
return NULL;
|
||||||
|
};
|
||||||
|
|
||||||
uri_or_tel_addr = linphone_core_interpret_url(lf->lc, uri_or_tel);
|
uri_or_tel_addr = linphone_core_interpret_url(lf->lc, uri_or_tel);
|
||||||
|
|
||||||
while (uri_or_tel_addr && iterator) {
|
while (uri_or_tel_addr && iterator) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue