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