fixed linker issue, and bad initialisation of pointer bug

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs_finale@6904 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2013-11-17 23:15:39 +00:00
parent f74aacd759
commit 6cbb3a65f8
3 changed files with 34 additions and 4 deletions

View File

@ -45,7 +45,7 @@ RsGxsNetService::RsGxsNetService(uint16_t servType, RsGeneralDataService *gds,
: p3Config(servType), p3ThreadedService(servType),
mTransactionTimeOut(TRANSAC_TIMEOUT), mServType(servType), mDataStore(gds), mTransactionN(0),
mObserver(nxsObs), mNxsMutex("RsGxsNetService"), mNetMgr(netMgr), mSYNC_PERIOD(SYNC_PERIOD),
mSyncTs(0), mReputations(reputations), mCircles(circles), mGrpAutoSync(grpAutoSync)
mSyncTs(0), mReputations(reputations), mCircles(circles), mGrpAutoSync(grpAutoSync), mGrpServerUpdateItem(NULL)
{
addSerialType(new RsNxsSerialiser(mServType));
@ -1972,8 +1972,11 @@ void RsGxsNetService::handleRecvSyncGroup(RsNxsSyncGrp* item)
std::string peer = item->PeerId();
// don't sync if you have no new updates for this peer
if(mGrpServerUpdateItem)
{
if(item->updateTS >= mGrpServerUpdateItem->grpUpdateTS && item->updateTS != 0)
return;
}
std::map<std::string, RsGxsGrpMetaData*> grp;
mDataStore->retrieveGxsGrpMetaData(grp);

View File

@ -51,8 +51,35 @@ void RsGxsMsgUpdateItem::clear()
std::ostream& RsGxsMsgUpdateItem::print(std::ostream& out, uint16_t indent)
{
}
void RsGxsServerMsgUpdateItem::clear()
{
msgUpdateTS = 0;
grpId.clear();
}
std::ostream& RsGxsServerMsgUpdateItem::print(std::ostream& out, uint16_t indent)
{
}
void RsGxsServerGrpUpdateItem::clear()
{
grpUpdateTS = 0;
}
std::ostream& RsGxsServerGrpUpdateItem::print(std::ostream& out, uint16_t indent)
{
}
uint32_t RsGxsUpdateSerialiser::size(RsItem* item)
{
RsGxsMsgUpdateItem* mui = NULL;

View File

@ -61,7 +61,7 @@ public:
RsGxsServerGrpUpdateItem(uint16_t servType) : RsItem(RS_PKT_VERSION_SERVICE, servType,
RS_PKT_SUBTYPE_GXS_SERVER_GRP_UPDATE)
{}
virtual ~RsGxsServerGrpUpdateItem();
virtual ~RsGxsServerGrpUpdateItem() {}
virtual void clear();
virtual std::ostream &print(std::ostream &out, uint16_t indent);
@ -74,7 +74,7 @@ class RsGxsMsgUpdateItem : public RsItem
public:
RsGxsMsgUpdateItem(uint16_t servType) : RsItem(RS_PKT_VERSION_SERVICE, servType, RS_PKT_SUBTYPE_GXS_MSG_UPDATE)
{}
virtual ~RsGxsMsgUpdateItem();
virtual ~RsGxsMsgUpdateItem() {}
virtual void clear();
virtual std::ostream &print(std::ostream &out, uint16_t indent);
@ -89,7 +89,7 @@ public:
RsGxsServerMsgUpdateItem(uint16_t servType) : RsItem(RS_PKT_VERSION_SERVICE,
servType, RS_PKT_SUBTYPE_GXS_SERVER_MSG_UPDATE)
{}
virtual ~RsGxsServerMsgUpdateItem();
virtual ~RsGxsServerMsgUpdateItem() {}
virtual void clear();
virtual std::ostream &print(std::ostream &out, uint16_t indent);