mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed bug fue to deleting ftFileCreator used by datamultiplex before asking datamultiplex to remove it!
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4606 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
526f71bebd
commit
0b33b6fc9d
@ -800,6 +800,11 @@ bool ftController::completeFile(std::string hash)
|
|||||||
// (csoler) I'm copying this because "delete fc->mTransfer" deletes the hash string!
|
// (csoler) I'm copying this because "delete fc->mTransfer" deletes the hash string!
|
||||||
std::string hash_to_suppress(fc->mTransfer->hash());
|
std::string hash_to_suppress(fc->mTransfer->hash());
|
||||||
|
|
||||||
|
// This should be done that early, because once the file creator is
|
||||||
|
// deleted, it should not be accessed by the data multiplex anymore!
|
||||||
|
//
|
||||||
|
mDataplex->removeTransferModule(hash_to_suppress) ;
|
||||||
|
|
||||||
if (fc->mTransfer)
|
if (fc->mTransfer)
|
||||||
{
|
{
|
||||||
delete fc->mTransfer;
|
delete fc->mTransfer;
|
||||||
@ -836,7 +841,6 @@ bool ftController::completeFile(std::string hash)
|
|||||||
std::cerr << "CompleteFile(): size = " << size << std::endl ;
|
std::cerr << "CompleteFile(): size = " << size << std::endl ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mDataplex->removeTransferModule(hash_to_suppress) ;
|
|
||||||
flags = fc->mFlags ;
|
flags = fc->mFlags ;
|
||||||
|
|
||||||
locked_queueRemove(it->second->mQueuePosition) ;
|
locked_queueRemove(it->second->mQueuePosition) ;
|
||||||
|
Loading…
Reference in New Issue
Block a user