diff --git a/libretroshare/src/ft/ftcontroller.cc b/libretroshare/src/ft/ftcontroller.cc index 74c5ab4b7..b60d72a96 100644 --- a/libretroshare/src/ft/ftcontroller.cc +++ b/libretroshare/src/ft/ftcontroller.cc @@ -926,10 +926,12 @@ bool ftController::FileDetails(std::string hash, FileInfo &info) if (completed) { info.transfered = info.size; + info.avail = info.transfered; } else { info.transfered = (it->second).mCreator->getRecvd(); + info.avail = info.transfered; } return true; diff --git a/libretroshare/src/ft/ftserver.cc b/libretroshare/src/ft/ftserver.cc index 5e2144d05..22b884536 100644 --- a/libretroshare/src/ft/ftserver.cc +++ b/libretroshare/src/ft/ftserver.cc @@ -246,7 +246,9 @@ std::string ftServer::getPartialsDirectory() bool ftServer::FileDownloads(std::list &hashs) { - return mFtDataplex->FileDownloads(hashs); + return mFtController->FileDownloads(hashs); + /* this only contains downloads.... not completed */ + //return mFtDataplex->FileDownloads(hashs); } bool ftServer::FileUploads(std::list &hashs) @@ -257,14 +259,14 @@ bool ftServer::FileUploads(std::list &hashs) bool ftServer::FileDetails(std::string hash, uint32_t hintflags, FileInfo &info) { bool found = false; - if (hintflags | RS_FILE_HINTS_DOWNLOAD) + if (hintflags & RS_FILE_HINTS_DOWNLOAD) { //found = mFtDataplex->FileDetails(hash, hintflags, info); // // Use Controller for download searches. found = mFtController->FileDetails(hash, info); } - else if (hintflags | RS_FILE_HINTS_UPLOAD) + else if (hintflags & RS_FILE_HINTS_UPLOAD) { found = mFtDataplex->FileDetails(hash, hintflags, info); }