From 9f727e2d942dd9d6ac6a3417606bfc84a1e3d269 Mon Sep 17 00:00:00 2001 From: drbob Date: Sun, 30 Nov 2008 17:17:28 +0000 Subject: [PATCH] Bugfixes for correct Channels display. * Corrected search in ftserver. * Updated avail in controller FileDetails. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@858 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/ft/ftcontroller.cc | 2 ++ libretroshare/src/ft/ftserver.cc | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) 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); }