fixed invalid use of wrong iterator in GXS reputation system

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8434 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-06-14 10:10:30 +00:00
parent a34d9a07af
commit ca07e1415d

View File

@ -360,11 +360,12 @@ bool p3GxsReputation::updateLatestUpdate(RsPeerId peerid, time_t ts)
{
RsStackMutex stack(mReputationMtx); /****** LOCKED MUTEX *******/
std::map<RsPeerId, ReputationConfig>::iterator it;
it = mConfig.find(peerid);
if (it != mConfig.end())
std::map<RsPeerId, ReputationConfig>::iterator it = mConfig.find(peerid);
if (it == mConfig.end())
{
mConfig[peerid] = ReputationConfig(peerid);
it = mConfig.find(peerid) ;
}
it->second.mLatestUpdate = ts;