mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-31 20:04:36 -04:00
fixed small bug in global router causing incoming messages to be in SENT mode
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8176 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ff6f14b7de
commit
a52031ac58
2 changed files with 94 additions and 89 deletions
|
@ -197,7 +197,7 @@
|
|||
#include "grouterclientservice.h"
|
||||
|
||||
/**********************/
|
||||
//#define GROUTER_DEBUG
|
||||
#define GROUTER_DEBUG
|
||||
/**********************/
|
||||
|
||||
const std::string p3GRouter::SERVICE_INFO_APP_NAME = "Global Router" ;
|
||||
|
@ -440,7 +440,7 @@ void p3GRouter::handleLowLevelTransactionAckItem(RsGRouterTransactionAcknItem *t
|
|||
|
||||
std::map<GRouterMsgPropagationId, GRouterRoutingInfo>::iterator it=_pending_messages.find(trans_ack_item->propagation_id) ;
|
||||
|
||||
if(it != _pending_messages.end())
|
||||
if(it != _pending_messages.end() && it->second.data_status == RS_GROUTER_DATA_STATUS_ONGOING)
|
||||
{
|
||||
it->second.data_status = RS_GROUTER_DATA_STATUS_SENT;
|
||||
it->second.last_sent_TS = time(NULL) ;
|
||||
|
@ -1522,8 +1522,6 @@ void p3GRouter::handleIncomingDataItem(RsGRouterGenericDataItem *data_item)
|
|||
else
|
||||
std::cerr << " verifying item signature: CHECKED!" ;
|
||||
#endif
|
||||
|
||||
|
||||
// No we need to send a signed receipt to the sender.
|
||||
|
||||
receipt_item = new RsGRouterSignedReceiptItem;
|
||||
|
|
|
@ -291,6 +291,14 @@ void GlobalRouterStatisticsWidget::updateContent()
|
|||
painter.setFont(monospace_f) ;
|
||||
|
||||
for(std::map<GRouterKeyId,std::vector<float> >::const_iterator it(matrix_info.per_friend_probabilities.begin());it!=matrix_info.per_friend_probabilities.end();++it)
|
||||
{
|
||||
bool is_null = true ;
|
||||
|
||||
for(uint32_t i=0;i<matrix_info.friend_ids.size();++i)
|
||||
if(it->second[i] > 0.0)
|
||||
is_null = false ;
|
||||
|
||||
if(!is_null)
|
||||
{
|
||||
QString ids = QString::fromStdString(it->first.toStdString())+" : " ;
|
||||
painter.drawText(ox+2*cellx,oy+celly,ids) ;
|
||||
|
@ -300,8 +308,7 @@ void GlobalRouterStatisticsWidget::updateContent()
|
|||
|
||||
oy += celly ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
oy += celly ;
|
||||
oy += celly ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue