Removed meta update filter for updateGroup, all meta changes now allowed.

- be careful not tested

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7124 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2014-02-16 22:28:23 +00:00
parent b785132cbe
commit a31f39c4bd
4 changed files with 8 additions and 26 deletions

View File

@ -1419,11 +1419,11 @@ void RsGenExchange::publishGroup(uint32_t& token, RsGxsGrpItem *grpItem)
} }
void RsGenExchange::updateGroup(uint32_t& token, RsGxsGroupUpdateMeta& updateMeta, RsGxsGrpItem* grpItem) void RsGenExchange::updateGroup(uint32_t& token, RsGxsGrpItem* grpItem)
{ {
RsStackMutex stack(mGenMtx); RsStackMutex stack(mGenMtx);
token = mDataAccess->generatePublicToken(); token = mDataAccess->generatePublicToken();
mGroupUpdatePublish.push_back(GroupUpdatePublish(grpItem, updateMeta, token)); mGroupUpdatePublish.push_back(GroupUpdatePublish(grpItem, token));
#ifdef GEN_EXCH_DEBUG #ifdef GEN_EXCH_DEBUG
std::cerr << "RsGenExchange::updateGroup() token: " << token; std::cerr << "RsGenExchange::updateGroup() token: " << token;
@ -1894,8 +1894,7 @@ void RsGenExchange::processGroupUpdatePublish()
} }
gup.grpItem->meta = *meta; //gup.grpItem->meta = *meta;
assignMetaUpdates(gup.grpItem->meta, gup.mUpdateMeta);
GxsGrpPendingSign ggps(gup.grpItem, ggps.mToken); GxsGrpPendingSign ggps(gup.grpItem, ggps.mToken);
bool publishAndAdminPrivatePresent = checkKeys(meta->keys); bool publishAndAdminPrivatePresent = checkKeys(meta->keys);
@ -1921,18 +1920,6 @@ void RsGenExchange::processGroupUpdatePublish()
mGroupUpdatePublish.clear(); mGroupUpdatePublish.clear();
} }
void RsGenExchange::assignMetaUpdates(RsGroupMetaData& meta, const RsGxsGroupUpdateMeta metaUpdate) const
{
const RsGxsGroupUpdateMeta::GxsMetaUpdate* updates = metaUpdate.getUpdates();
RsGxsGroupUpdateMeta::GxsMetaUpdate::const_iterator mit = updates->begin();
for(; mit != updates->end(); mit++)
{
if(mit->first == RsGxsGroupUpdateMeta::NAME)
meta.mGroupName = mit->second;
}
}
bool RsGenExchange::checkKeys(const RsTlvSecurityKeySet& keySet) bool RsGenExchange::checkKeys(const RsTlvSecurityKeySet& keySet)
{ {

View File

@ -532,7 +532,7 @@ protected:
* @param token * @param token
* @param grpItem * @param grpItem
*/ */
void updateGroup(uint32_t& token, RsGxsGroupUpdateMeta& updateMeta, RsGxsGrpItem* grpItem); void updateGroup(uint32_t& token, RsGxsGrpItem* grpItem);
public: public:
/*! /*!
@ -778,11 +778,6 @@ private:
*/ */
bool checkKeys(const RsTlvSecurityKeySet& keySet); bool checkKeys(const RsTlvSecurityKeySet& keySet);
/*!
* Convenience function for assigning the meta update items to the actual group meta
*/
void assignMetaUpdates(RsGroupMetaData& meta, const RsGxsGroupUpdateMeta metaUpdate) const;
private: private:
RsMutex mGenMtx; RsMutex mGenMtx;

View File

@ -227,7 +227,7 @@ bool p3GxsForums::updateGroup(uint32_t &token, RsGxsGroupUpdateMeta& meta, RsGxs
grpItem->meta = group.mMeta; grpItem->meta = group.mMeta;
grpItem->meta.mGroupId = meta.getGroupId(); grpItem->meta.mGroupId = meta.getGroupId();
RsGenExchange::updateGroup(token, meta, grpItem); // RsGenExchange::updateGroup(token, meta, grpItem);
return true; return true;
} }

View File

@ -636,10 +636,10 @@ bool p3IdService::updateGroup(uint32_t& token, RsGxsIdGroup &group)
std::cerr << "p3IdService::updateGroup() Updating RsGxsId: " << id; std::cerr << "p3IdService::updateGroup() Updating RsGxsId: " << id;
std::cerr << std::endl; std::cerr << std::endl;
//RsGenExchange::updateGroup(token, item); RsGenExchange::updateGroup(token, item);
RsGxsGroupUpdateMeta updateMeta(id); //RsGxsGroupUpdateMeta updateMeta(id);
RsGenExchange::updateGroup(token, updateMeta, item); //RsGenExchange::updateGroup(token, updateMeta, item);
// if its in the cache - clear it. // if its in the cache - clear it.
{ {