3 GXS BugFixes:

- GxsCircles was created twice, removed second.
 - Modified Gxs DataLayer to always write AuthorId, modified retrieval to clear string if NULL.
      This originally caused AuthorId to filled with GroupId.
 - Fixed rsgxsnetservice to use mInternalCircle, rather than mCircleId.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7291 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2014-04-21 10:13:35 +00:00
parent bce35d26e3
commit 6319733113
4 changed files with 8 additions and 13 deletions

View File

@ -651,10 +651,7 @@ int RsDataService::storeGroup(std::map<RsNxsGrp *, RsGxsGrpMetaData *> &grp)
cv.put(KEY_NXS_HASH, grpMetaPtr->mHash.toStdString());
cv.put(KEY_RECV_TS, (int32_t)grpMetaPtr->mRecvTS);
cv.put(KEY_GRP_REP_CUTOFF, (int32_t)grpMetaPtr->mReputationCutOff);
if(! (grpMetaPtr->mAuthorId.isNull()) ){
cv.put(KEY_NXS_IDENTITY, grpMetaPtr->mAuthorId.toStdString());
}
cv.put(KEY_NXS_IDENTITY, grpMetaPtr->mAuthorId.toStdString());
offset = 0;
char keySetData[grpMetaPtr->keys.TlvSize()];
@ -742,10 +739,7 @@ int RsDataService::updateGroup(std::map<RsNxsGrp *, RsGxsGrpMetaData *> &grp)
cv.put(KEY_GRP_ORIGINATOR, grpMetaPtr->mOriginator.toStdString());
cv.put(KEY_GRP_AUTHEN_FLAGS, (int32_t)grpMetaPtr->mAuthenFlags);
cv.put(KEY_NXS_HASH, grpMetaPtr->mHash.toStdString());
if(! (grpMetaPtr->mAuthorId.isNull()) ){
cv.put(KEY_NXS_IDENTITY, grpMetaPtr->mAuthorId.toStdString());
}
cv.put(KEY_NXS_IDENTITY, grpMetaPtr->mAuthorId.toStdString());
offset = 0;
char keySetData[grpMetaPtr->keys.TlvSize()];

View File

@ -2185,7 +2185,7 @@ bool RsGxsNetService::canSendGrpId(const RsPeerId& sslId, RsGxsGrpMetaData& grpM
// is the personal circle owner
if(!grpMeta.mInternalCircle.isNull())
{
const RsGxsCircleId& internalCircleId = grpMeta.mCircleId;
const RsGxsCircleId& internalCircleId = grpMeta.mInternalCircle;
if(mCircles->isLoaded(internalCircleId))
{
const RsPgpId& pgpId = rsPeers->getGPGId(sslId);

View File

@ -1315,6 +1315,7 @@ int RsServer::StartupRetroShare()
RsGeneralDataService* gxscircles_ds = new RsDataService(currGxsDir + "/", "gxscircles_db",
RS_SERVICE_GXS_TYPE_GXSCIRCLE, NULL, RsInitConfig::gxs_passwd);
// create GxsCircles - early, as IDs need it.
mGxsCircles = new p3GxsCircles(gxscircles_ds, NULL, mGxsIdService);
// create GXS ID service
@ -1327,10 +1328,6 @@ int RsServer::StartupRetroShare()
mGxsIdService->setNes(gxsid_ns);
/**** GxsCircle service ****/
// init gxs services
mGxsCircles = new p3GxsCircles(gxscircles_ds, NULL, mGxsIdService);
// create GXS Circle service
RsGxsNetService* gxscircles_ns = new RsGxsNetService(
RS_SERVICE_GXS_TYPE_GXSCIRCLE, gxscircles_ds, nxsMgr,

View File

@ -735,6 +735,10 @@ void RetroCursor::getString(int columnIndex, std::string &str){
str.clear();
#endif
}
else
{
str.clear();
}
}
const void* RetroCursor::getData(int columnIndex, uint32_t &datSize){