mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-14 00:49:41 -05:00
merged with upstream/master
This commit is contained in:
commit
4bf9262382
@ -1141,24 +1141,30 @@ void p3GRouter::locked_collectAvailableFriends(const GRouterKeyId& gxs_id,const
|
||||
|
||||
for(uint32_t i=0;i<tmp_peers.size();++i)
|
||||
if(incoming_routes.find(tmp_peers[i]) != incoming_routes.end())
|
||||
{
|
||||
{
|
||||
#ifdef GROUTER_DEBUG
|
||||
std::cerr << " removing " << tmp_peers[i] << " which is an incoming route" << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if(online_ids.find(tmp_peers[i]) == online_ids.end())
|
||||
{
|
||||
#ifdef GROUTER_DEBUG
|
||||
std::cerr << " removing " << tmp_peers[i] << " because it is offline now!" << std::endl;
|
||||
#endif
|
||||
}
|
||||
else if(probas[i] < RS_GROUTER_PROBABILITY_THRESHOLD_BEST_PEERS_SELECT*max_probability)
|
||||
{
|
||||
{
|
||||
#ifdef GROUTER_DEBUG
|
||||
std::cerr << " removing " << tmp_peers[i] << " because probability is below best peers threshold" << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
tmp_peers[count] = tmp_peers[i] ;
|
||||
probas[count] = (max_probability==0.0)? (0.5+0.001*RSRandom::random_f32()) : probas[i] ;
|
||||
++count ;
|
||||
}
|
||||
|
||||
++count ;
|
||||
}
|
||||
|
||||
tmp_peers.resize(count) ;
|
||||
probas.resize(count) ;
|
||||
|
||||
|
@ -439,7 +439,7 @@ ops_boolean_t ops_dsa_verify(const unsigned char *hash,size_t hash_length,
|
||||
{
|
||||
ERR_load_crypto_strings() ;
|
||||
unsigned long err = 0 ;
|
||||
while(err = ERR_get_error())
|
||||
while((err = ERR_get_error()) > 0)
|
||||
fprintf(stderr,"DSA_do_verify(): ERR = %ld. lib error:\"%s\", func_error:\"%s\", reason:\"%s\"\n",err,ERR_lib_error_string(err),ERR_func_error_string(err),ERR_reason_error_string(err)) ;
|
||||
//assert(ret >= 0);
|
||||
return ops_false ;
|
||||
|
@ -799,6 +799,33 @@ void GxsForumThreadWidget::insertGroupData()
|
||||
tw->mForumDescription = QString("<b>%1: \t</b>%2<br/>").arg(tr("Forum name"), QString::fromUtf8( group.mMeta.mGroupName.c_str()));
|
||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Subscribers")).arg(group.mMeta.mPop);
|
||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Posts (at neighbor nodes)")).arg(group.mMeta.mVisibleMsgCount);
|
||||
|
||||
QString distrib_string = tr("[unknown]");
|
||||
switch(group.mMeta.mCircleType)
|
||||
{
|
||||
case GXS_CIRCLE_TYPE_PUBLIC: distrib_string = tr("Public") ;
|
||||
break ;
|
||||
case GXS_CIRCLE_TYPE_EXTERNAL:
|
||||
{
|
||||
RsGxsCircleDetails det ;
|
||||
|
||||
// !! What we need here is some sort of CircleLabel, which loads the circle and updates the label when done.
|
||||
|
||||
if(rsGxsCircles->getCircleDetails(group.mMeta.mCircleId,det))
|
||||
distrib_string = tr("Restricted to members of circle \"")+QString::fromUtf8(det.mCircleName.c_str()) +"\"";
|
||||
else
|
||||
distrib_string = tr("Restricted to members of circle ")+QString::fromStdString(group.mMeta.mCircleId.toStdString()) ;
|
||||
}
|
||||
break ;
|
||||
case GXS_CIRCLE_TYPE_YOUREYESONLY: distrib_string = tr("Your eyes only");
|
||||
break ;
|
||||
case GXS_CIRCLE_TYPE_LOCAL: distrib_string = tr("You and your friend nodes");
|
||||
break ;
|
||||
default:
|
||||
std::cerr << "(EE) badly initialised group distribution ID = " << group.mMeta.mCircleType << std::endl;
|
||||
}
|
||||
|
||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Distribution"), distrib_string);
|
||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Author"), author);
|
||||
|
||||
if(!anti_spam_features1.isNull())
|
||||
|
Loading…
Reference in New Issue
Block a user