1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-25 02:09:48 +01:00

randomize XMPP resource name so that multiple Tomahawk/JReen instances do not collide.

This commit is contained in:
Frank Osterfeld 2011-04-13 04:50:51 +08:00 committed by Christian Muehlhaeuser
parent 800c06e678
commit b214dd01f8

View File

@ -60,7 +60,7 @@ Jabber_p::Jabber_p( const QString& jid, const QString& password, const QString&
m_jid = Jreen::JID( jid );
m_client = new Jreen::Client( jid, password );
m_client->setResource( QString( "tomahawk%1" ).arg( "DOMME" ) );
m_client->setResource( QString( "tomahawk-jreen%1" ).arg( QString::number( qrand() % 10000 ) ) );
Jreen::Capabilities::Ptr caps = m_client->presence().findExtension<Jreen::Capabilities>();
caps->setNode(TOMAHAWK_CAP_NODE_NAME);