mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 03:49:29 -04:00
branch commit 3185: removed deadlock situation in data multiplex
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3186 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d6625a15b8
commit
531567997d
1 changed files with 17 additions and 12 deletions
|
@ -493,6 +493,9 @@ bool ftDataMultiplex::handleRecvServerChunkMapRequest(const std::string& peerId,
|
||||||
bool ftDataMultiplex::handleRecvData(const std::string& peerId,
|
bool ftDataMultiplex::handleRecvData(const std::string& peerId,
|
||||||
const std::string& hash, uint64_t size,
|
const std::string& hash, uint64_t size,
|
||||||
uint64_t offset, uint32_t chunksize, void *data)
|
uint64_t offset, uint32_t chunksize, void *data)
|
||||||
|
{
|
||||||
|
ftTransferModule *transfer_module = NULL ;
|
||||||
|
|
||||||
{
|
{
|
||||||
RsStackMutex stack(dataMtx); /******* LOCK MUTEX ******/
|
RsStackMutex stack(dataMtx); /******* LOCK MUTEX ******/
|
||||||
std::map<std::string, ftClient>::iterator it;
|
std::map<std::string, ftClient>::iterator it;
|
||||||
|
@ -511,7 +514,9 @@ bool ftDataMultiplex::handleRecvData(const std::string& peerId,
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
(it->second).mModule->recvFileData(peerId, offset, chunksize, data);
|
transfer_module = (it->second).mModule ;
|
||||||
|
}
|
||||||
|
transfer_module->recvFileData(peerId, offset, chunksize, data);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue