Skip to content
Snippets Groups Projects
Commit 4be331e3 authored by Yun Liu's avatar Yun Liu
Browse files

Fix for bug ticket #91

parent fa0f8f28
No related branches found
No related tags found
No related merge requests found
......@@ -2319,15 +2319,19 @@ ManagerImpl::getAccountIdFromNameAndServer(const std::string& userName, const st
// Try to find the account id from username and server name by full match
for(iter = _accountMap.begin(); iter != _accountMap.end(); ++iter) {
account = dynamic_cast<SIPAccount *>(iter->second);
if(account->fullMatch(userName, server))
return iter->first;
if (account != NULL){
if(account->fullMatch(userName, server))
return iter->first;
}
}
// We failed! Then only match the username
for(iter = _accountMap.begin(); iter != _accountMap.end(); ++iter) {
account = dynamic_cast<SIPAccount *>(iter->second);
if(account->userMatch(userName))
return iter->first;
if ( account != NULL ) {
if(account->userMatch(userName))
return iter->first;
}
}
// Failed again! return AccountNULL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment