Expose timeout parameter for LLCurlRequest::getByteRange

meow-7.2.2
Ansariel 2013-05-15 10:47:16 +02:00
parent 2c737f34da
commit 465a154f77
2 changed files with 13 additions and 3 deletions

View File

@ -1130,7 +1130,11 @@ void LLCurlRequest::get(const std::string& url, LLCurl::ResponderPtr responder)
bool LLCurlRequest::getByteRange(const std::string& url,
const headers_t& headers,
S32 offset, S32 length,
LLCurl::ResponderPtr responder)
// <FS:Ansariel> Expose time out param
//LLCurl::ResponderPtr responder)
LLCurl::ResponderPtr responder,
S32 time_out)
// </FS:Ansariel>
{
llassert(LLCurl::sNotQuitting);
LLCurl::Easy* easy = allocEasy();
@ -1138,7 +1142,10 @@ bool LLCurlRequest::getByteRange(const std::string& url,
{
return false;
}
easy->prepRequest(url, headers, responder);
// <FS:Ansariel> Expose time out param
//easy->prepRequest(url, headers, responder);
easy->prepRequest(url, headers, responder, time_out);
// </FS:Ansariel>
easy->setopt(CURLOPT_HTTPGET, 1);
if (length > 0)
{

View File

@ -387,7 +387,10 @@ public:
~LLCurlRequest();
void get(const std::string& url, LLCurl::ResponderPtr responder);
bool getByteRange(const std::string& url, const headers_t& headers, S32 offset, S32 length, LLCurl::ResponderPtr responder);
// <FS:Ansariel> Expose time out param
//bool getByteRange(const std::string& url, const headers_t& headers, S32 offset, S32 length, LLCurl::ResponderPtr responder);
bool getByteRange(const std::string& url, const headers_t& headers, S32 offset, S32 length, LLCurl::ResponderPtr responder, S32 time_out = 0);
// </FS:Ansariel>
bool post(const std::string& url, const headers_t& headers, const LLSD& data, LLCurl::ResponderPtr responder, S32 time_out = 0);
bool post(const std::string& url, const headers_t& headers, const std::string& data, LLCurl::ResponderPtr responder, S32 time_out = 0);