summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2014-06-20 04:19:45 +0100
committerCho <cho@lindenlab.com>2014-06-20 04:19:45 +0100
commitc88b237473a75310722bac8d65a028a33a573215 (patch)
treeb6d5ee907f0e84342f0fa5d96621b7dcc7143c29 /indra
parent90262889c6f559492a6f245cc389594f868a93ae (diff)
Updated LLExperienceCache::LLExperienceResponder to work with updated LLCurl::Responder interface, to fix ACME-1532 and ACME-1525
Diffstat (limited to 'indra')
-rw-r--r--indra/llmessage/llexperiencecache.cpp26
-rwxr-xr-xindra/newview/llfloaterregioninfo.cpp2
-rw-r--r--indra/newview/llpanelexperiencepicker.cpp2
-rw-r--r--indra/newview/llpanelgroupexperiences.cpp2
4 files changed, 13 insertions, 19 deletions
diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp
index c8deaac1ef..1fb77c4391 100644
--- a/indra/llmessage/llexperiencecache.cpp
+++ b/indra/llmessage/llexperiencecache.cpp
@@ -257,7 +257,7 @@ namespace LLExperienceCache
LLSDSerialize::toPrettyXML(data, ostr);
}
- class LLExperienceResponder : public LLHTTPClient::Responder
+ class LLExperienceResponder : public LLCurl::Responder
{
public:
LLExperienceResponder(const ask_queue_t& keys)
@@ -266,14 +266,9 @@ namespace LLExperienceCache
}
- virtual void completedHeader(U32 status, const std::string& reason, const LLSD& content)
+ /*virtual*/ void httpSuccess()
{
- mHeaders = content;
- }
-
- virtual void result(const LLSD& content)
- {
- LLSD experiences = content["experience_keys"];
+ LLSD experiences = getContent()["experience_keys"];
LLSD::array_const_iterator it = experiences.beginArray();
for( /**/ ; it != experiences.endArray(); ++it)
{
@@ -287,7 +282,7 @@ namespace LLExperienceCache
processExperience(public_key, row);
}
- LLSD error_ids = content["error_ids"];
+ LLSD error_ids = getContent()["error_ids"];
LLSD::array_const_iterator errIt = error_ids.beginArray();
for( /**/ ; errIt != error_ids.endArray() ; ++errIt )
{
@@ -306,13 +301,13 @@ namespace LLExperienceCache
LL_DEBUGS("ExperienceCache") << sCache.size() << " cached experiences" << LL_ENDL;
}
- virtual void error(U32 status, const std::string& reason)
+ /*virtual*/ void httpFailure()
{
- LL_WARNS("ExperienceCache") << "Request failed "<<status<<" "<<reason<< LL_ENDL;
+ LL_WARNS("ExperienceCache") << "Request failed "<<getStatus()<<" "<<getReason()<< LL_ENDL;
// We're going to construct a dummy record and cache it for a while,
// either briefly for a 503 Service Unavailable, or longer for other
// errors.
- F64 retry_timestamp = errorRetryTimestamp(status);
+ F64 retry_timestamp = errorRetryTimestamp(getStatus());
// Add dummy records for all agent IDs in this request
@@ -330,7 +325,7 @@ namespace LLExperienceCache
exp[EXPERIENCE_ID] = it->first;
exp["key_type"] = it->second;
exp["uuid"] = it->first;
- exp["error"] = (LLSD::Integer)status;
+ exp["error"] = (LLSD::Integer)getStatus();
exp[QUOTA] = DEFAULT_QUOTA;
LLExperienceCache::processExperience(it->first, exp);
@@ -344,7 +339,7 @@ namespace LLExperienceCache
{
// Retry-After takes priority
- LLSD retry_after = mHeaders["retry-after"];
+ LLSD retry_after = getResponseHeaders()["retry-after"];
if (retry_after.isDefined())
{
// We only support the delta-seconds type
@@ -358,7 +353,7 @@ namespace LLExperienceCache
// If no Retry-After, look for Cache-Control max-age
F64 expires = 0.0;
- if (LLExperienceCache::expirationFromCacheControl(mHeaders, &expires))
+ if (LLExperienceCache::expirationFromCacheControl(getResponseHeaders(), &expires))
{
return expires;
}
@@ -387,7 +382,6 @@ namespace LLExperienceCache
private:
ask_queue_t mKeys;
- LLSD mHeaders;
};
void requestExperiences()
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index f70152fc59..487610b797 100755
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -3620,7 +3620,7 @@ void LLPanelRegionExperiences::processResponse( const LLSD& content )
}
-class LLRegionExperienceResponder : public LLHTTPClient::Responder
+class LLRegionExperienceResponder : public LLCurl::Responder
{
public:
typedef boost::function<void (const LLSD&)> callback_t;
diff --git a/indra/newview/llpanelexperiencepicker.cpp b/indra/newview/llpanelexperiencepicker.cpp
index 0a572a8a5c..3a55295d8c 100644
--- a/indra/newview/llpanelexperiencepicker.cpp
+++ b/indra/newview/llpanelexperiencepicker.cpp
@@ -57,7 +57,7 @@ const static std::string columnSpace = " ";
static LLPanelInjector<LLPanelExperiencePicker> t_panel_status("llpanelexperiencepicker");
-class LLExperienceSearchResponder : public LLHTTPClient::Responder
+class LLExperienceSearchResponder : public LLCurl::Responder
{
public:
LLUUID mQueryID;
diff --git a/indra/newview/llpanelgroupexperiences.cpp b/indra/newview/llpanelgroupexperiences.cpp
index 140a71a528..4f8c5eb94f 100644
--- a/indra/newview/llpanelgroupexperiences.cpp
+++ b/indra/newview/llpanelgroupexperiences.cpp
@@ -42,7 +42,7 @@
static LLPanelInjector<LLPanelGroupExperiences> t_panel_group_experiences("panel_group_experiences");
-class LLGroupExperienceResponder : public LLHTTPClient::Responder
+class LLGroupExperienceResponder : public LLCurl::Responder
{
public:
LLHandle<LLPanelGroupExperiences> mHandle;