From: Manuel Nickschas Date: Sat, 29 Mar 2008 22:17:57 +0000 (+0000) Subject: Adding some debug output to NetworkConnection for the next time we run into the endless X-Git-Tag: 0.2.0-alpha5~50 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=90ee8b5c90923a3d4a48fc5493ca999e9d0d6a97 Adding some debug output to NetworkConnection for the next time we run into the endless message loop... :( Starting core with --sputdev will print a warning whenever a message is received twice from the socket.. That will make crystal-clear if the bug is in our handler or in QTcpSocket. NOTE: Starting core with --sputdev currently has no other side-effects, don't try this with the client though :) --- diff --git a/src/core/networkconnection.cpp b/src/core/networkconnection.cpp index 43749bcd..a461d262 100644 --- a/src/core/networkconnection.cpp +++ b/src/core/networkconnection.cpp @@ -280,6 +280,11 @@ void NetworkConnection::disconnectFromIrc(bool requested) { void NetworkConnection::socketHasData() { while(socket.canReadLine()) { QByteArray s = socket.readLine().trimmed(); + // FIXME debug + if(Global::SPUTDEV && s == lastMsgReceived) { + qWarning() << "NetworkConnection::socketHasData(): Message repeated! -> loop?"; + } + lastMsgReceived = s; ircServerHandler()->handleServerMsg(s); } } diff --git a/src/core/networkconnection.h b/src/core/networkconnection.h index 1a7aafaa..83ea6f31 100644 --- a/src/core/networkconnection.h +++ b/src/core/networkconnection.h @@ -170,6 +170,8 @@ private: bool _previousConnectionAttemptFailed; int _lastUsedServerlistIndex; + QByteArray lastMsgReceived; // FIXME debug + class ParseError : public Exception { public: ParseError(QString cmd, QString prefix, QStringList params);