From 654de490c2de566d43b6bc7e9923517a6932661a Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 15 Jan 2011 00:10:51 +0000 Subject: [PATCH] - set max time for FTP transfers to 10 minutes --- source/shared_lib/sources/platform/posix/miniftpclient.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/shared_lib/sources/platform/posix/miniftpclient.cpp b/source/shared_lib/sources/platform/posix/miniftpclient.cpp index 19eb45a3..9e4a4f77 100644 --- a/source/shared_lib/sources/platform/posix/miniftpclient.cpp +++ b/source/shared_lib/sources/platform/posix/miniftpclient.cpp @@ -253,6 +253,9 @@ FTP_Client_ResultType FTPClientThread::getMapFromServer(string mapFileName, stri /* Set a pointer to our struct to pass to the callback */ curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile); + // Max 10 minutes to transfer + curl_easy_setopt(curl, CURLOPT_TIMEOUT, 600); + /* Switch on full protocol/debug output */ if(SystemFlags::VERBOSE_MODE_ENABLED) curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); @@ -407,6 +410,9 @@ FTP_Client_ResultType FTPClientThread::getTilesetFromServer(string tileSetName, curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, file_progress); curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &ftpfile); + // Max 10 minutes to transfer + curl_easy_setopt(curl, CURLOPT_TIMEOUT, 600); + // Switch on full protocol/debug output if(SystemFlags::VERBOSE_MODE_ENABLED) curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);