Commit 7801dae8 authored by Pali Rohár's avatar Pali Rohár
Browse files

Fix JabberResourcePool::lockToResource

When locking contact to resource check only for bare JID. It does not make sense to check for full JID with (maybe old/bad) resource name

CCBUG: 324937
parent fae1f3e2
......@@ -220,7 +220,7 @@ void JabberResourcePool::clear ()
void JabberResourcePool::lockToResource ( const XMPP::Jid &jid, const XMPP::Resource &resource )
{
kDebug(JABBER_DEBUG_GLOBAL) << "Locking " << jid.full() << " to " << resource.name();
kDebug(JABBER_DEBUG_GLOBAL) << "Locking " << jid.bare() << " to " << resource.name();
// remove all existing locks first
removeLock ( jid );
......@@ -228,7 +228,7 @@ void JabberResourcePool::lockToResource ( const XMPP::Jid &jid, const XMPP::Reso
// find the resource in our dictionary that matches
foreach(JabberResource *mResource, d->pool)
{
if ( (mResource->jid().bare().toLower() == jid.full().toLower()) && (mResource->resource().name().toLower() == resource.name().toLower()) )
if ( (mResource->jid().bare().toLower() == jid.bare().toLower()) && (mResource->resource().name().toLower() == resource.name().toLower()) )
{
d->lockList.append ( mResource );
return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment