mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
roll back to 725
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@727 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e8d21abdd5
commit
cc41cbb708
@ -122,7 +122,7 @@ void ftController::checkDownloadQueue()
|
||||
bool ftController::completeFile(std::string hash)
|
||||
{
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
|
||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
|
||||
@ -134,16 +134,17 @@ bool ftController::completeFile(std::string hash)
|
||||
}
|
||||
|
||||
/* check if finished */
|
||||
if (!(it->second).mCreator->finished())
|
||||
//if (!(it->second).mCreator->finished())
|
||||
{
|
||||
/* not done! */
|
||||
return false;
|
||||
//return false;
|
||||
}
|
||||
|
||||
|
||||
ftFileControl *fc = &(it->second);
|
||||
|
||||
/* done - cleanup */
|
||||
fc->mTransfer->done();
|
||||
//fc->mTransfer->done();
|
||||
mDataplex->removeTransferModule(fc->mTransfer->hash());
|
||||
|
||||
delete fc->mTransfer;
|
||||
@ -152,7 +153,7 @@ bool ftController::completeFile(std::string hash)
|
||||
delete fc->mCreator;
|
||||
fc->mCreator = NULL;
|
||||
|
||||
fc->mState = COMPLETE;
|
||||
fc->mState = ftFileControl::COMPLETED;
|
||||
|
||||
/* switch map */
|
||||
mCompleted[fc->mHash] = *fc;
|
||||
|
@ -57,6 +57,8 @@ class ftFileControl
|
||||
{
|
||||
public:
|
||||
|
||||
enum {DOWNLOADING,COMPLETED};
|
||||
|
||||
ftFileControl();
|
||||
ftFileControl(std::string fname, uint64_t size, std::string hash,
|
||||
uint32_t flags, ftFileCreator *fc, ftTransferModule *tm);
|
||||
@ -93,6 +95,7 @@ bool FileRequest(std::string fname, std::string hash,
|
||||
bool FileCancel(std::string hash);
|
||||
bool FileControl(std::string hash, uint32_t flags);
|
||||
bool FileClearCompleted();
|
||||
bool completeFile(std::string hash);
|
||||
|
||||
/* get Details of File Transfers */
|
||||
bool FileDownloads(std::list<std::string> &hashs);
|
||||
@ -132,7 +135,7 @@ virtual bool loadList(std::list<RsItem *> load);
|
||||
|
||||
/* RunTime Functions */
|
||||
void checkDownloadQueue();
|
||||
bool completeFile(std::string hash);
|
||||
//bool completeFile(std::string hash);
|
||||
|
||||
/* pointers to other components */
|
||||
|
||||
@ -142,7 +145,7 @@ bool completeFile(std::string hash);
|
||||
RsMutex ctrlMutex;
|
||||
|
||||
std::list<FileInfo> incomingQueue;
|
||||
std::map<std::string, FileInfo> mCompleted;
|
||||
std::map<std::string, ftFileControl> mCompleted;
|
||||
|
||||
|
||||
std::map<std::string, ftFileControl> mDownloads;
|
||||
|
Loading…
Reference in New Issue
Block a user