From 0b33b6fc9d72918648752c13cda7618399404567 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 15 Sep 2011 19:33:58 +0000 Subject: [PATCH] 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 --- libretroshare/src/ft/ftcontroller.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/ft/ftcontroller.cc b/libretroshare/src/ft/ftcontroller.cc index c582a2c14..04b712420 100644 --- a/libretroshare/src/ft/ftcontroller.cc +++ b/libretroshare/src/ft/ftcontroller.cc @@ -800,6 +800,11 @@ bool ftController::completeFile(std::string hash) // (csoler) I'm copying this because "delete fc->mTransfer" deletes the hash string! 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) { delete fc->mTransfer; @@ -836,7 +841,6 @@ bool ftController::completeFile(std::string hash) std::cerr << "CompleteFile(): size = " << size << std::endl ; #endif - mDataplex->removeTransferModule(hash_to_suppress) ; flags = fc->mFlags ; locked_queueRemove(it->second->mQueuePosition) ;