From fe9f6c6bbc9e682af709fe08757c31ba17a298d1 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 6 Apr 2012 06:28:12 +0000 Subject: I think I fixed a seeking bug in the qt gatsstream, but...I haven't tested it yet. --- c++-qt/gats-qt/protocolgats.h | 1 - c++-qt/src/gatsstream.cpp | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) delete mode 120000 c++-qt/gats-qt/protocolgats.h (limited to 'c++-qt') diff --git a/c++-qt/gats-qt/protocolgats.h b/c++-qt/gats-qt/protocolgats.h deleted file mode 120000 index 034a523..0000000 --- a/c++-qt/gats-qt/protocolgats.h +++ /dev/null @@ -1 +0,0 @@ -../src/protocolgats.h \ No newline at end of file diff --git a/c++-qt/src/gatsstream.cpp b/c++-qt/src/gatsstream.cpp index d32b2b2..ae53d0d 100644 --- a/c++-qt/src/gatsstream.cpp +++ b/c++-qt/src/gatsstream.cpp @@ -86,15 +86,20 @@ void Gats::GatsStream::writeObject( Gats::Object *pObject ) pTmp->write( (const char *)&iSize, 4 ); pObject->write( *pTmp ); iSize = htonl( pTmp->pos() ); + uint64_t iEndPos = pTmp->pos(); pTmp->seek( iSizePos ); pTmp->write( (const char *)&iSize, 4 ); - pTmp->close(); if( rStream.isSequential() ) { + pTmp->close(); rStream.write( ((QBuffer *)pTmp)->data() ); delete pTmp; } + else + { + pTmp->seek( iSizePos ); + } } bool Gats::GatsStream::skipReadNulls() -- cgit v1.2.3