diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-08-15 22:48:05 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-08-15 22:48:05 +0000 |
commit | 05a0404eaaf9fc333d719f6d11de384a3cc133e9 (patch) | |
tree | d88334e94115695ce877bc20490d80df37d50a27 /test/basicserver | |
parent | a7d13863e249ccf63e36d899486c6728650b2bad (diff) |
Fix compile error caused by auto consume streams patch.
Diffstat (limited to 'test/basicserver')
-rw-r--r-- | test/basicserver/TestCommands.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/basicserver/TestCommands.cpp b/test/basicserver/TestCommands.cpp index a0022f72..7c22eab3 100644 --- a/test/basicserver/TestCommands.cpp +++ b/test/basicserver/TestCommands.cpp @@ -72,7 +72,8 @@ std::auto_ptr<TestProtocolMessage> TestProtocolGetStream::DoCommand(TestProtocol return std::auto_ptr<TestProtocolMessage>(new TestProtocolGetStream(mStartingValue, mUncertainSize)); } -std::auto_ptr<TestProtocolMessage> TestProtocolSendStream::DoCommand(TestProtocolReplyable &rProtocol, TestContext &rContext) const +std::auto_ptr<TestProtocolMessage> TestProtocolSendStream::DoCommand(TestProtocolReplyable &rProtocol, + TestContext &rContext, IOStream& rDataStream) const { if(mValue != 0x73654353298ffLL) { @@ -80,15 +81,14 @@ std::auto_ptr<TestProtocolMessage> TestProtocolSendStream::DoCommand(TestProtoco } // Get a stream - std::auto_ptr<IOStream> stream(rProtocol.ReceiveStream()); - bool uncertain = (stream->BytesLeftToRead() == IOStream::SizeOfStreamUnknown); + bool uncertain = (rDataStream.BytesLeftToRead() == IOStream::SizeOfStreamUnknown); // Count how many bytes in it int bytes = 0; char buffer[125]; - while(stream->StreamDataLeft()) + while(rDataStream.StreamDataLeft()) { - bytes += stream->Read(buffer, sizeof(buffer)); + bytes += rDataStream.Read(buffer, sizeof(buffer)); } // tell the caller how many bytes there were |