mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-02-23 11:25:52 +01:00
* If we receive unexpected data in Servent, log it for debugging.
This commit is contained in:
parent
b03eb6defb
commit
d932aa6c2d
@ -96,6 +96,11 @@ Servent::Servent( QObject* parent )
|
|||||||
|
|
||||||
Servent::~Servent()
|
Servent::~Servent()
|
||||||
{
|
{
|
||||||
|
tDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
|
foreach ( ControlConnection* cc, m_controlconnections )
|
||||||
|
delete cc;
|
||||||
|
|
||||||
if ( m_portfwd )
|
if ( m_portfwd )
|
||||||
{
|
{
|
||||||
m_portfwd.data()->quit();
|
m_portfwd.data()->quit();
|
||||||
@ -267,6 +272,7 @@ void
|
|||||||
Servent::unregisterControlConnection( ControlConnection* conn )
|
Servent::unregisterControlConnection( ControlConnection* conn )
|
||||||
{
|
{
|
||||||
Q_ASSERT( conn );
|
Q_ASSERT( conn );
|
||||||
|
|
||||||
tLog( LOGVERBOSE ) << Q_FUNC_INFO << conn->name();
|
tLog( LOGVERBOSE ) << Q_FUNC_INFO << conn->name();
|
||||||
m_connectedNodes.removeAll( conn->id() );
|
m_connectedNodes.removeAll( conn->id() );
|
||||||
m_controlconnections.removeAll( conn );
|
m_controlconnections.removeAll( conn );
|
||||||
@ -459,7 +465,13 @@ Servent::readyRead()
|
|||||||
|
|
||||||
QByteArray ba = sock.data()->read( sock.data()->_msg->length() );
|
QByteArray ba = sock.data()->read( sock.data()->_msg->length() );
|
||||||
sock.data()->_msg->fill( ba );
|
sock.data()->_msg->fill( ba );
|
||||||
Q_ASSERT( sock.data()->_msg->is( Msg::JSON ) );
|
|
||||||
|
if ( !sock.data()->_msg->is( Msg::JSON ) )
|
||||||
|
{
|
||||||
|
tDebug() << ba;
|
||||||
|
tDebug() << sock.data()->_msg->payload();
|
||||||
|
Q_ASSERT( sock.data()->_msg->is( Msg::JSON ) );
|
||||||
|
}
|
||||||
|
|
||||||
ControlConnection* cc = 0;
|
ControlConnection* cc = 0;
|
||||||
bool ok;
|
bool ok;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user