mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 11:54:22 -04:00
fixed bug in global router causing SIGSEGV in some cases
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8247 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c01680808f
commit
dcbcd4f556
1 changed files with 5 additions and 2 deletions
|
@ -197,7 +197,7 @@
|
||||||
#include "grouterclientservice.h"
|
#include "grouterclientservice.h"
|
||||||
|
|
||||||
/**********************/
|
/**********************/
|
||||||
#define GROUTER_DEBUG
|
//#define GROUTER_DEBUG
|
||||||
/**********************/
|
/**********************/
|
||||||
|
|
||||||
const std::string p3GRouter::SERVICE_INFO_APP_NAME = "Global Router" ;
|
const std::string p3GRouter::SERVICE_INFO_APP_NAME = "Global Router" ;
|
||||||
|
@ -408,7 +408,6 @@ void p3GRouter::handleLowLevelTransactionChunkItem(RsGRouterTransactionChunkItem
|
||||||
RS_STACK_MUTEX(grMtx) ;
|
RS_STACK_MUTEX(grMtx) ;
|
||||||
|
|
||||||
generic_item = _incoming_data_pipes[pid].addDataChunk(dynamic_cast<RsGRouterTransactionChunkItem*>(chunk_item->duplicate())) ;// addDataChunk takes ownership over chunk_item
|
generic_item = _incoming_data_pipes[pid].addDataChunk(dynamic_cast<RsGRouterTransactionChunkItem*>(chunk_item->duplicate())) ;// addDataChunk takes ownership over chunk_item
|
||||||
generic_item->PeerId(pid) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// send to client off-mutex
|
// send to client off-mutex
|
||||||
|
@ -416,6 +415,8 @@ void p3GRouter::handleLowLevelTransactionChunkItem(RsGRouterTransactionChunkItem
|
||||||
if(generic_item == NULL)
|
if(generic_item == NULL)
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
|
generic_item->PeerId(pid) ;
|
||||||
|
|
||||||
#ifdef GROUTER_DEBUG
|
#ifdef GROUTER_DEBUG
|
||||||
std::cerr << " transaction is finished. Passing newly created item to client." << std::endl;
|
std::cerr << " transaction is finished. Passing newly created item to client." << std::endl;
|
||||||
std::cerr << " sending a ACK item" << std::endl;
|
std::cerr << " sending a ACK item" << std::endl;
|
||||||
|
@ -1739,6 +1740,8 @@ bool p3GRouter::decryptDataItem(RsGRouterGenericDataItem *item)
|
||||||
std::cerr << "(EE) Cannot decrypt incoming message. Key " << item->destination_key << " unknown." << std::endl;
|
std::cerr << "(EE) Cannot decrypt incoming message. Key " << item->destination_key << " unknown." << std::endl;
|
||||||
else
|
else
|
||||||
std::cerr << "(EE) Cannot decrypt incoming message. Unknown error. " << std::endl;
|
std::cerr << "(EE) Cannot decrypt incoming message. Unknown error. " << std::endl;
|
||||||
|
|
||||||
|
return false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(item->data_bytes) ;
|
free(item->data_bytes) ;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue