fixed small bug preventing msg exchange

This commit is contained in:
csoler 2015-10-12 00:28:21 -04:00
parent 82c16c6a27
commit 36101a977d
2 changed files with 5 additions and 2 deletions

View File

@ -2016,7 +2016,7 @@ void RsGxsNetService::locked_genReqMsgTransaction(NxsTransaction* tr)
// if author is required for this message, it will simply get dropped
// at genexchange side of things
if(rep.score > (int)grpMeta->mReputationCutOff || noAuthor)
if(rep.score >= (int)grpMeta->mReputationCutOff || noAuthor)
{
#ifdef NXS_NET_DEBUG
std::cerr << ", passed! Adding message to req list." << std::endl;
@ -2218,7 +2218,7 @@ void RsGxsNetService::locked_genReqGrpTransaction(NxsTransaction* tr)
latestVersion = grpSyncItem->publishTs > metaIter->second->mPublishTs;
}
if(rsReputations->isIdentityBanned(grpSyncItem->authorId))
if(!grpSyncItem->authorId.isNull() && rsReputations->isIdentityBanned(grpSyncItem->authorId))
{
std::cerr << " Identity " << grpSyncItem->authorId << " is banned. Not syncing group." << std::endl;
continue ;

View File

@ -727,6 +727,9 @@ bool p3GxsReputation::loadReputationSet(RsGxsReputationSetItem *item, const std:
std::map<RsGxsId, Reputation>::iterator rit;
if(item->mGxsId.isNull()) // just a protection against potential errors having put 00000 into ids.
return false ;
/* find matching Reputation */
RsGxsId gxsId(item->mGxsId);
rit = mReputations.find(gxsId);