From 533e2a8b451b2107f07e68358d262f47d9fa5f25 Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 28 Jun 2017 23:23:27 +0200 Subject: [PATCH] added check to fix existing wrong storage time value in GxsTrans --- libretroshare/src/gxstrans/p3gxstrans.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libretroshare/src/gxstrans/p3gxstrans.cc b/libretroshare/src/gxstrans/p3gxstrans.cc index 42c225b52..71cc9763e 100644 --- a/libretroshare/src/gxstrans/p3gxstrans.cc +++ b/libretroshare/src/gxstrans/p3gxstrans.cc @@ -153,7 +153,16 @@ void p3GxsTrans::handleResponse(uint32_t token, uint32_t req_type) mPreferredGroupId.clear(); for( auto grp : groups ) + { locked_supersedePreferredGroup(grp->meta.mGroupId); + + if(RsGenExchange::getStoragePeriod(grp->meta.mGroupId) != GXS_STORAGE_PERIOD) + { + std::cerr << "(WW) forcing storage period in GxsTrans group " << grp->meta.mGroupId << " to " << GXS_STORAGE_PERIOD << " seconds. Value was " << RsGenExchange::getStoragePeriod(grp->meta.mGroupId) << std::endl; + + RsGenExchange::setStoragePeriod(grp->meta.mGroupId,GXS_STORAGE_PERIOD) ; + } + } } #ifdef DEBUG_GXSTRANS