projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
89afcda
)
adding debuing output to find the source for that qUncompress / socket read issue
author
Marcus Eggenberger
<egs@quassel-irc.org>
Thu, 16 Oct 2008 23:22:02 +0000
(
01:22
+0200)
committer
Marcus Eggenberger
<egs@quassel-irc.org>
Thu, 16 Oct 2008 23:22:02 +0000
(
01:22
+0200)
src/common/signalproxy.cpp
patch
|
blob
|
history
diff --git
a/src/common/signalproxy.cpp
b/src/common/signalproxy.cpp
index
0350ac6
..
014e4b3
100644
(file)
--- a/
src/common/signalproxy.cpp
+++ b/
src/common/signalproxy.cpp
@@
-966,6
+966,15
@@
bool SignalProxy::readDataFromDevice(QIODevice *dev, quint32 &blockSize, QVarian
if(compressed) {
QByteArray rawItem;
in >> rawItem;
+ // debug check
+ int nbytes = rawItem.size();
+ if (nbytes <= 4) {
+ const char *data = rawItem.constData();
+ if (nbytes < 4 || (data[0]!=0 || data[1]!=0 || data[2]!=0 || data[3]!=0))
+ qWarning() << "receieved corrupted compressed data:"
+ << blockSize << rawItem << rawItem.size() << dev;
+ }
+ // end
rawItem = qUncompress(rawItem);
QDataStream itemStream(&rawItem, QIODevice::ReadOnly);