From 95a577ccd03963234a601fe06f83eb53b667b0a4 Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 9 Sep 2009 20:14:43 +0000 Subject: [PATCH] Integrated turtle download to all kind of user-requested downloads git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1625 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/ft/ftcontroller.cc | 1 - libretroshare/src/ft/ftserver.cc | 4 ++++ retroshare-gui/src/gui/TransfersDialog.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/ft/ftcontroller.cc b/libretroshare/src/ft/ftcontroller.cc index 9c0da0c25..5f3eb414f 100644 --- a/libretroshare/src/ft/ftcontroller.cc +++ b/libretroshare/src/ft/ftcontroller.cc @@ -899,7 +899,6 @@ bool ftController::FileCancel(std::string hash) } mDownloads.erase(mit); - mTurtle->stopMonitoringFileTunnels(hash) ; IndicateConfigChanged(); /* completed transfer -> save */ return true; diff --git a/libretroshare/src/ft/ftserver.cc b/libretroshare/src/ft/ftserver.cc index ff937cc7f..77c434bdc 100644 --- a/libretroshare/src/ft/ftserver.cc +++ b/libretroshare/src/ft/ftserver.cc @@ -251,11 +251,15 @@ bool ftServer::FileRequest(std::string fname, std::string hash, uint64_t size, const DwlDetails details(fname, hash, size, dest, flags, srcIds, Normal); mFtDwlQueue->insertDownload(details); + rsTurtle->monitorFileTunnels( fname,hash,size ) ; + return true ; } bool ftServer::FileCancel(std::string hash) { + rsTurtle->stopMonitoringFileTunnels(hash) ; + return mFtController->FileCancel(hash); } diff --git a/retroshare-gui/src/gui/TransfersDialog.cpp b/retroshare-gui/src/gui/TransfersDialog.cpp index bec1eb7bb..2d6320457 100644 --- a/retroshare-gui/src/gui/TransfersDialog.cpp +++ b/retroshare-gui/src/gui/TransfersDialog.cpp @@ -1005,7 +1005,7 @@ void TransfersDialog::pasteLink() //downloadFileRequested(linkData.getName (), linkData.getSize ().toInt (), // linkData.getHash (), "", -1, -1, -1, -1); rsFiles->FileRequest (linkData.getName ().toStdString (), linkData.getHash ().toStdString (), - linkData.getSize ().toInt (), "", 0, srcIds); + linkData.getSize().toULongLong(), "", 0, srcIds); } }