diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-04-06 06:28:12 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-04-06 06:28:12 +0000 |
commit | fe9f6c6bbc9e682af709fe08757c31ba17a298d1 (patch) | |
tree | e10ff71b5ed6b48a65419a1896f9b92b75fa4e07 /c++-qt | |
parent | fba73219e3c7bf65b459a3303f579fd83c8fd0af (diff) | |
download | libgats-fe9f6c6bbc9e682af709fe08757c31ba17a298d1.tar.gz libgats-fe9f6c6bbc9e682af709fe08757c31ba17a298d1.tar.bz2 libgats-fe9f6c6bbc9e682af709fe08757c31ba17a298d1.tar.xz libgats-fe9f6c6bbc9e682af709fe08757c31ba17a298d1.zip |
I think I fixed a seeking bug in the qt gatsstream, but...I haven't tested it
yet.
Diffstat (limited to 'c++-qt')
l--------- | c++-qt/gats-qt/protocolgats.h | 1 | ||||
-rw-r--r-- | c++-qt/src/gatsstream.cpp | 7 |
2 files changed, 6 insertions, 2 deletions
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 @@ | |||
1 | ../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 ) | |||
86 | pTmp->write( (const char *)&iSize, 4 ); | 86 | pTmp->write( (const char *)&iSize, 4 ); |
87 | pObject->write( *pTmp ); | 87 | pObject->write( *pTmp ); |
88 | iSize = htonl( pTmp->pos() ); | 88 | iSize = htonl( pTmp->pos() ); |
89 | uint64_t iEndPos = pTmp->pos(); | ||
89 | pTmp->seek( iSizePos ); | 90 | pTmp->seek( iSizePos ); |
90 | pTmp->write( (const char *)&iSize, 4 ); | 91 | pTmp->write( (const char *)&iSize, 4 ); |
91 | pTmp->close(); | ||
92 | 92 | ||
93 | if( rStream.isSequential() ) | 93 | if( rStream.isSequential() ) |
94 | { | 94 | { |
95 | pTmp->close(); | ||
95 | rStream.write( ((QBuffer *)pTmp)->data() ); | 96 | rStream.write( ((QBuffer *)pTmp)->data() ); |
96 | delete pTmp; | 97 | delete pTmp; |
97 | } | 98 | } |
99 | else | ||
100 | { | ||
101 | pTmp->seek( iSizePos ); | ||
102 | } | ||
98 | } | 103 | } |
99 | 104 | ||
100 | bool Gats::GatsStream::skipReadNulls() | 105 | bool Gats::GatsStream::skipReadNulls() |