Commit 9b236e53 authored by jehan's avatar jehan

avoid useless uri parsing when no presence model found for a friend

parent 91c0fc4a
......@@ -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);
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);
while (uri_or_tel_addr && iterator) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment