mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Be more careful when accessing cc->socket() in Servent::claimOffer().
This commit is contained in:
@@ -1135,7 +1135,11 @@ Servent::claimOffer( ControlConnection* cc, const QString &nodeid, const QString
|
|||||||
QMutexLocker locker( &d->controlconnectionsMutex );
|
QMutexLocker locker( &d->controlconnectionsMutex );
|
||||||
foreach ( ControlConnection* cc, d->controlconnections )
|
foreach ( ControlConnection* cc, d->controlconnections )
|
||||||
{
|
{
|
||||||
|
if ( cc->socket() )
|
||||||
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Probing:" << cc->name() << cc->socket()->peerAddress();
|
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Probing:" << cc->name() << cc->socket()->peerAddress();
|
||||||
|
else
|
||||||
|
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Probing error:" << cc->name() << "has invalid socket";
|
||||||
|
|
||||||
// Always compare IPv6 addresses as IPv4 address are sometime simply IPv4 addresses, sometimes mapped IPv6 addresses
|
// Always compare IPv6 addresses as IPv4 address are sometime simply IPv4 addresses, sometimes mapped IPv6 addresses
|
||||||
if ( cc->socket() && equalByIPv6Address( cc->socket()->peerAddress(), peer ) )
|
if ( cc->socket() && equalByIPv6Address( cc->socket()->peerAddress(), peer ) )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user