* Set domain for which this authentication is valid. This should not be necessary because realm is supposed to be unique and sufficient.
* However, many SIP servers don't set realm correctly, then domain has to be used to distinguish between several SIP account bearing the same username.
ms_warning("Non unique realm found for %s",username);
returnNULL;
}
ret=pinfo;
}else{
if(key_match(pinfo->username,username))
candidate=pinfo;
}
}
}elsereturnpinfo;
}
}
if(ret==NULL&&candidate!=NULL)
ret=candidate;
returnret;
}
/**
* Find authentication info matching realm, username, domain criterias.
* First of all, (realm,username) pair are searched. If multiple results (which should not happen because realm are supposed to be unique), then domain is added to the search.
* @param lc the LinphoneCore
* @param realm the authentication 'realm' (optional)
* @param username the SIP username to be authenticated (mandatory)