Fix crash caused by two XMPP users using single PurpleAccount instance
This commit is contained in:
parent
ef259f4aef
commit
132059ca7d
1 changed files with 6 additions and 1 deletions
|
@ -344,8 +344,13 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
|
|||
}
|
||||
|
||||
if (purple_accounts_find(name.c_str(), protocol.c_str()) != NULL) {
|
||||
LOG4CXX_INFO(logger, "Using previously created account with name '" << name.c_str() << "' and protocol '" << protocol << "'");
|
||||
account = purple_accounts_find(name.c_str(), protocol.c_str());
|
||||
if (m_accounts.find(account) != m_accounts.end() && m_accounts[account] != user) {
|
||||
LOG4CXX_INFO(logger, "Account '" << name << "' is already used by '" << m_accounts[account] << "'");
|
||||
np->handleDisconnected(user, 0, "Account '" + name + "' is already used by '" + m_accounts[account] + "'");
|
||||
return;
|
||||
}
|
||||
LOG4CXX_INFO(logger, "Using previously created account with name '" << name.c_str() << "' and protocol '" << protocol << "'");
|
||||
}
|
||||
else {
|
||||
LOG4CXX_INFO(logger, "Creating account with name '" << name.c_str() << "' and protocol '" << protocol << "'");
|
||||
|
|
Loading…
Add table
Reference in a new issue