Fixed database keying bug, left db closed causing meta modification fail.

- needed to keep ssl pword a little while longer after rs init

Added more sturdy logic to prevent segv on failed msg/grp meta modification

Added, Data base does not key database if key string is empty

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6448 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2013-06-20 19:50:25 +00:00
parent 5e319b1261
commit 6b0594dfe1
4 changed files with 36 additions and 22 deletions

View file

@ -1562,12 +1562,12 @@ bool RsGenExchange::processGrpMask(const RsGxsGroupId& grpId, ContentValue &grpC
ok = true;
}
if(grpCv.getAsInt32(RsGeneralDataService::GRP_META_STATUS, value))
if(grpCv.getAsInt32(RsGeneralDataService::GRP_META_STATUS, value) && grpMeta)
{
key = RsGeneralDataService::GRP_META_STATUS;
currValue = grpMeta->mGroupStatus;
}
else if(grpCv.getAsInt32(RsGeneralDataService::GRP_META_SUBSCRIBE_FLAG, value))
else if(grpCv.getAsInt32(RsGeneralDataService::GRP_META_SUBSCRIBE_FLAG, value) && grpMeta)
{
key = RsGeneralDataService::GRP_META_SUBSCRIBE_FLAG;
currValue = grpMeta->mSubscribeFlags;
@ -1575,7 +1575,7 @@ bool RsGenExchange::processGrpMask(const RsGxsGroupId& grpId, ContentValue &grpC
{
if(grpMeta)
delete grpMeta;
return true;
return false;
}
ok &= grpCv.getAsInt32(key+GXS_MASK, mask);

View file

@ -32,9 +32,6 @@
#include "serialiser/rstlvkeys.h"
#include "serialiser/rsgxsitems.h"
typedef std::string RsGxsGroupId;
typedef std::string RsGxsMessageId;
class RsGroupMetaData;
class RsMsgMetaData;