diff options
Diffstat (limited to 'cpp/src/qpid/linearstore/journal/deq_rec.cpp')
-rw-r--r-- | cpp/src/qpid/linearstore/journal/deq_rec.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/qpid/linearstore/journal/deq_rec.cpp b/cpp/src/qpid/linearstore/journal/deq_rec.cpp index a4882aaa9c..90ca27d082 100644 --- a/cpp/src/qpid/linearstore/journal/deq_rec.cpp +++ b/cpp/src/qpid/linearstore/journal/deq_rec.cpp @@ -181,7 +181,7 @@ deq_rec::encode(void* wptr, uint32_t rec_offs_dblks, uint32_t max_size_dblks, Ch } bool -deq_rec::decode(::rec_hdr_t& h, std::ifstream* ifsp, std::size_t& rec_offs) +deq_rec::decode(::rec_hdr_t& h, std::ifstream* ifsp, std::size_t& rec_offs, const std::streampos rec_start) { if (rec_offs == 0) { @@ -228,7 +228,7 @@ deq_rec::decode(::rec_hdr_t& h, std::ifstream* ifsp, std::size_t& rec_offs) assert(!ifsp->fail() && !ifsp->bad()); return false; } - check_rec_tail(); + check_rec_tail(rec_start); } ifsp->ignore(rec_size_dblks() * QLS_DBLK_SIZE_BYTES - rec_size()); assert(!ifsp->fail() && !ifsp->bad()); @@ -274,7 +274,7 @@ deq_rec::rec_size() const } void -deq_rec::check_rec_tail() const { +deq_rec::check_rec_tail(const std::streampos rec_start) const { Checksum checksum; checksum.addData((const unsigned char*)&_deq_hdr, sizeof(::deq_hdr_t)); if (_deq_hdr._xidsize > 0) { @@ -284,7 +284,7 @@ deq_rec::check_rec_tail() const { uint16_t res = ::rec_tail_check(&_deq_tail, &_deq_hdr._rhdr, cs); if (res != 0) { std::stringstream oss; - oss << std::hex; + oss << std::endl << " Record offset: 0x" << std::hex << rec_start; if (res & ::REC_TAIL_MAGIC_ERR_MASK) { oss << std::endl << " Magic: expected 0x" << ~_deq_hdr._rhdr._magic << "; found 0x" << _deq_tail._xmagic; } |