[Box Backup-commit] COMMIT r2311 - box/trunk/lib/server
boxbackup-dev at boxbackup.org
boxbackup-dev at boxbackup.org
Fri Oct 3 23:10:39 BST 2008
Author: chris
Date: 2008-10-03 23:10:38 +0100 (Fri, 03 Oct 2008)
New Revision: 2311
Modified:
box/trunk/lib/server/Protocol.cpp
Log:
More debugging, log type of stream received and fix logging of header byte.
Modified: box/trunk/lib/server/Protocol.cpp
===================================================================
--- box/trunk/lib/server/Protocol.cpp 2008-10-02 22:37:33 UTC (rev 2310)
+++ box/trunk/lib/server/Protocol.cpp 2008-10-03 22:10:38 UTC (rev 2311)
@@ -670,9 +670,18 @@
InformStreamReceiving(streamSize);
// Return a stream object
- return std::auto_ptr<IOStream>((streamSize == ProtocolStream_SizeUncertain)?
- ((IOStream*)(new ProtocolUncertainStream(mrStream)))
- :((IOStream*)(new PartialReadStream(mrStream, streamSize))));
+ if(streamSize == ProtocolStream_SizeUncertain)
+ {
+ BOX_TRACE("Receiving stream, size uncertain");
+ return std::auto_ptr<IOStream>(
+ new ProtocolUncertainStream(mrStream));
+ }
+ else
+ {
+ BOX_TRACE("Receiving stream, size " << streamSize << " bytes");
+ return std::auto_ptr<IOStream>(
+ new PartialReadStream(mrStream, streamSize));
+ }
}
// --------------------------------------------------------------------------
@@ -816,8 +825,8 @@
}
}
ASSERT(header > 0);
- BOX_TRACE("Sending header byte " << header << " plus " << writeSize <<
- " bytes to stream");
+ BOX_TRACE("Sending header byte " << (int)header << " plus " <<
+ writeSize << " bytes to stream");
// Store the header
Block[-1] = header;
More information about the Boxbackup-commit
mailing list