mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-12 01:14:29 -05:00
removed deadlock situation in data multiplex
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5.0@3185 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
10565a1fe7
commit
1c9bcb53e8
@ -494,6 +494,9 @@ 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;
|
||||||
if (mClients.end() == (it = mClients.find(hash)))
|
if (mClients.end() == (it = mClients.find(hash)))
|
||||||
@ -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…
Reference in New Issue
Block a user