mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Fix all the style issues!
This commit is contained in:
@@ -435,7 +435,7 @@ XmppSipPlugin::errorMessage( Jreen::Client::DisconnectReason reason )
|
||||
void
|
||||
XmppSipPlugin::sendSipInfo( const Tomahawk::peerinfo_ptr& receiver, const SipInfo& info )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << receiver << info;
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << receiver << info;
|
||||
|
||||
if ( !m_client )
|
||||
return;
|
||||
|
@@ -306,7 +306,7 @@ Servent::registerPeer( const Tomahawk::peerinfo_ptr& peerInfo )
|
||||
peerInfoDebug(peerInfo) << "YAY, we need to establish the connection now.. thinking";
|
||||
if ( !connectedToSession( peerInfo->sipInfo().uniqname() ) )
|
||||
{
|
||||
Servent::instance()->connectToPeer( peerInfo );
|
||||
connectToPeer( peerInfo );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -328,21 +328,21 @@ Servent::registerPeer( const Tomahawk::peerinfo_ptr& peerInfo )
|
||||
else
|
||||
{
|
||||
SipInfo info;
|
||||
if( Servent::instance()->visibleExternally() )
|
||||
if( visibleExternally() )
|
||||
{
|
||||
QString peerId = peerInfo->id();
|
||||
QString key = uuid();
|
||||
ControlConnection* conn = new ControlConnection( Servent::instance() );
|
||||
ControlConnection* conn = new ControlConnection( this );
|
||||
|
||||
const QString& nodeid = Database::instance()->impl()->dbid();
|
||||
conn->setName( peerId.left( peerId.indexOf( "/" ) ) );
|
||||
conn->setId( nodeid );
|
||||
conn->addPeerInfo( peerInfo );
|
||||
|
||||
Servent::instance()->registerOffer( key, conn );
|
||||
registerOffer( key, conn );
|
||||
info.setVisible( true );
|
||||
info.setHost( Servent::instance()->externalAddress() );
|
||||
info.setPort( Servent::instance()->externalPort() );
|
||||
info.setHost( externalAddress() );
|
||||
info.setPort( externalPort() );
|
||||
info.setKey( key );
|
||||
info.setUniqname( nodeid );
|
||||
|
||||
@@ -389,13 +389,13 @@ void Servent::handleSipInfo( const Tomahawk::peerinfo_ptr& peerInfo )
|
||||
*/
|
||||
if ( info.isVisible() )
|
||||
{
|
||||
if( !Servent::instance()->visibleExternally() ||
|
||||
Servent::instance()->externalAddress() < info.host() ||
|
||||
( Servent::instance()->externalAddress() == info.host() && Servent::instance()->externalPort() < info.port() ) )
|
||||
if( !visibleExternally() ||
|
||||
externalAddress() < info.host() ||
|
||||
( externalAddress() == info.host() && externalPort() < info.port() ) )
|
||||
{
|
||||
|
||||
tDebug() << "Initiate connection to" << peerInfo->id() << "at" << info.host() << " peer of: " << peerInfo->sipPlugin()->account()->accountFriendlyName();
|
||||
Servent::instance()->connectToPeer( peerInfo );
|
||||
connectToPeer( peerInfo );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -716,12 +716,12 @@ Servent::connectToPeer( const peerinfo_ptr& peerInfo )
|
||||
|
||||
foreach( const peerinfo_ptr& currentPeerInfo, c->peerInfos() )
|
||||
{
|
||||
tLog() << "peerInfo:" << currentPeerInfo->debugName() << "same object: " << (peerInfo == currentPeerInfo) << (peerInfo.data() == currentPeerInfo.data()) << (peerInfo->debugName() == currentPeerInfo->debugName());
|
||||
peerInfoDebug( currentPeerInfo ) << "Same object: " << ( peerInfo == currentPeerInfo ) << ( peerInfo.data() == currentPeerInfo.data() ) << ( peerInfo->debugName() == currentPeerInfo->debugName() );
|
||||
|
||||
if(peerInfo == currentPeerInfo)
|
||||
{
|
||||
isDupe = true;
|
||||
tLog() << "Not adding " << peerInfo->debugName() << ", because it's a dupe: peerInfoCount remains " << conn->peerInfos().count();
|
||||
peerInfoDebug( currentPeerInfo ) << "Not adding, because it's a dupe: peerInfoCount remains the same " << conn->peerInfos().count();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -883,6 +883,7 @@ Servent::claimOffer( ControlConnection* cc, const QString &nodeid, const QString
|
||||
conn->setName( peer.toString() );
|
||||
|
||||
Tomahawk::Accounts::Account* account = Tomahawk::Accounts::AccountManager::instance()->zeroconfAccount();
|
||||
|
||||
// if we get this connection the account should exist and be enabled
|
||||
Q_ASSERT( account );
|
||||
Q_ASSERT( account->enabled() );
|
||||
|
@@ -265,8 +265,7 @@ bool operator==( const SipInfo& one, const SipInfo& two )
|
||||
&& one.host() == two.host()
|
||||
&& one.port() == two.port()
|
||||
&& one.uniqname() == two.uniqname()
|
||||
&& one.key() == two.key()
|
||||
)
|
||||
&& one.key() == two.key() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user