mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-27 18:12:21 -04:00
fixed but in re-sending of failed grouter items
This commit is contained in:
parent
aa194caea3
commit
6d1a3937d6
5 changed files with 41 additions and 16 deletions
|
@ -1852,7 +1852,7 @@ void p3MsgService::manageDistantPeers()
|
|||
}
|
||||
}
|
||||
|
||||
void p3MsgService::notifyDataStatus(const GRouterMsgPropagationId& id,uint32_t data_status)
|
||||
void p3MsgService::notifyDataStatus(const GRouterMsgPropagationId& id, const RsGxsId &signer_id, uint32_t data_status)
|
||||
{
|
||||
if(data_status == GROUTER_CLIENT_SERVICE_DATA_STATUS_FAILED)
|
||||
{
|
||||
|
@ -1860,7 +1860,7 @@ void p3MsgService::notifyDataStatus(const GRouterMsgPropagationId& id,uint32_t d
|
|||
|
||||
std::cerr << "(WW) p3MsgService::notifyDataStatus: Global router tells us that item ID " << id << " could not be delivered on time." ;
|
||||
std::map<GRouterMsgPropagationId,uint32_t>::iterator it = _ongoing_messages.find(id) ;
|
||||
|
||||
|
||||
if(it == _ongoing_messages.end())
|
||||
{
|
||||
std::cerr << " (EE) cannot find pending message to acknowledge. Weird. grouter id = " << id << std::endl;
|
||||
|
@ -1868,6 +1868,7 @@ void p3MsgService::notifyDataStatus(const GRouterMsgPropagationId& id,uint32_t d
|
|||
}
|
||||
uint32_t msg_id = it->second ;
|
||||
std::cerr << " message id = " << msg_id << std::endl;
|
||||
mDistantOutgoingMsgSigners[msg_id] = signer_id ; // this is needed because it's not saved in config, but we should probably include it in _ongoing_messages
|
||||
|
||||
std::map<uint32_t,RsMsgItem*>::iterator mit = msgOutgoing.find(msg_id) ;
|
||||
|
||||
|
@ -1991,7 +1992,15 @@ void p3MsgService::sendDistantMsgItem(RsMsgItem *msgitem)
|
|||
{
|
||||
RS_STACK_MUTEX(mMsgMtx) ;
|
||||
|
||||
signing_key_id = mDistantOutgoingMsgSigners[msgitem->msgId] ;
|
||||
std::map<uint32_t,RsGxsId>::const_iterator it = mDistantOutgoingMsgSigners.find(msgitem->msgId) ;
|
||||
|
||||
if(it == mDistantOutgoingMsgSigners.end())
|
||||
{
|
||||
std::cerr << "(EE) no signer registered for distant message " << msgitem->msgId << ". Cannot send!" << std::endl;
|
||||
return ;
|
||||
}
|
||||
|
||||
signing_key_id = it->second ;
|
||||
|
||||
if(signing_key_id.isNull())
|
||||
{
|
||||
|
|
|
@ -142,7 +142,7 @@ private:
|
|||
|
||||
virtual bool acceptDataFromPeer(const RsGxsId& gxs_id) ;
|
||||
virtual void receiveGRouterData(const RsGxsId& destination_key,const RsGxsId& signing_key, GRouterServiceId &client_id, uint8_t *data, uint32_t data_size) ;
|
||||
virtual void notifyDataStatus(const GRouterMsgPropagationId& msg_id,uint32_t data_status) ;
|
||||
virtual void notifyDataStatus(const GRouterMsgPropagationId& msg_id,const RsGxsId& signer_id,uint32_t data_status) ;
|
||||
|
||||
// Utility functions
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue