From 465a154f77e731cd7bde1712402cc2a50af1a494 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 15 May 2013 10:47:16 +0200 Subject: [PATCH] Expose timeout parameter for LLCurlRequest::getByteRange --- indra/llmessage/llcurl.cpp | 11 +++++++++-- indra/llmessage/llcurl.h | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 3054bb5a7c..3f4a8d9ff4 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -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) + // Expose time out param + //LLCurl::ResponderPtr responder) + LLCurl::ResponderPtr responder, + S32 time_out) + // { 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); + // Expose time out param + //easy->prepRequest(url, headers, responder); + easy->prepRequest(url, headers, responder, time_out); + // easy->setopt(CURLOPT_HTTPGET, 1); if (length > 0) { diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index 4258f477ee..22219b0bbc 100755 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -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); + // 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); + // 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);