mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-21 05:38:12 +00:00
Protect config from using contact if it doesn't exist while checking authentication
This commit is contained in:
parent
f15a68d343
commit
f736f110a6
1 changed files with 8 additions and 4 deletions
|
|
@ -60,10 +60,14 @@ void CoreHandlers::onAuthenticationRequested (
|
|||
auto config = configList.begin() ;
|
||||
std::string username = authInfo->getUsername();
|
||||
std::string domain = authInfo->getDomain();
|
||||
while(config != configList.end() && ((*config)->getContact()->getUsername() != username || (*config)->getContact()->getDomain() != domain))
|
||||
++config;
|
||||
if( config != configList.end() )
|
||||
emit authenticationRequested(authInfo);// Send authentification request only if a proxy still exists
|
||||
while(config != configList.end()) {
|
||||
auto contact = (*config)->getContact();
|
||||
if( contact && contact->getUsername() == username && (*config)->getContact()->getDomain() == domain) {
|
||||
emit authenticationRequested(authInfo);// Send authentification request only if a proxy still exists
|
||||
return;
|
||||
}else
|
||||
++config;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue