From 63c6629e57882a0b770862e6b8099f40404dd885 Mon Sep 17 00:00:00 2001 From: electron128 Date: Sun, 20 Dec 2015 14:29:24 +0100 Subject: [PATCH] added missing initialisation of local, not serialised msg meta data in NxsTestHub --- tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.cc b/tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.cc index 2606718ed..302950339 100644 --- a/tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.cc +++ b/tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.cc @@ -159,6 +159,13 @@ void rs_nxs_test::NxsTestHub::notifyNewMessages(const RsPeerId& pid, { RsNxsMsg* msg = *it; RsGxsMsgMetaData* meta = new RsGxsMsgMetaData(); + // local meta is not touched by the deserialisation routine + // have to initialise it + meta->mMsgStatus = 0; + meta->mMsgSize = 0; + meta->mChildTs = 0; + meta->recvTS = 0; + meta->validated = false; bool ok = meta->deserialise(msg->meta.bin_data, &(msg->meta.bin_len)); toStore.insert(std::make_pair(msg, meta)); }