From 77cd190633abfb10f5bd66a36035e45382242aad Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 12 May 2015 16:59:51 -0700 Subject: Use Coros to post viewer stats. --- indra/newview/llviewerstats.cpp | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'indra/newview/llviewerstats.cpp') diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index f60829e9e8..c6292cec5b 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -60,6 +60,7 @@ #include "llfeaturemanager.h" #include "llviewernetwork.h" #include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived +#include "llcorehttputil.h" namespace LLStatViewer { @@ -410,24 +411,6 @@ void update_statistics() } } -class ViewerStatsResponder : public LLHTTPClient::Responder -{ - LOG_CLASS(ViewerStatsResponder); -public: - ViewerStatsResponder() { } - -private: - /* virtual */ void httpFailure() - { - LL_WARNS() << dumpResponse() << LL_ENDL; - } - - /* virtual */ void httpSuccess() - { - LL_INFOS() << "OK" << LL_ENDL; - } -}; - /* * The sim-side LLSD is in newsim/llagentinfo.cpp:forwardViewerStats. * @@ -618,8 +601,8 @@ void send_stats() body["MinimalSkin"] = false; LLViewerStats::getInstance()->addToMessage(body); - LLHTTPClient::post(url, body, new ViewerStatsResponder()); - + LLCoreHttpUtil::HttpCoroutineAdapter::genericHttpPost(url, body, + "Statistics posted to sim", "Failed to post statistics to sim"); LLViewerStats::instance().getRecording().resume(); } -- cgit v1.2.3 From 9ec050a0673c28b25eeb28ae7926ff1070cbb4c3 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 14 May 2015 10:33:46 -0700 Subject: Make generic callback version of trivial GET/PUT methods. Make message use these methods. --- indra/newview/llviewerstats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerstats.cpp') diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index c6292cec5b..2c3067cd3a 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -601,7 +601,7 @@ void send_stats() body["MinimalSkin"] = false; LLViewerStats::getInstance()->addToMessage(body); - LLCoreHttpUtil::HttpCoroutineAdapter::genericHttpPost(url, body, + LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(url, body, "Statistics posted to sim", "Failed to post statistics to sim"); LLViewerStats::instance().getRecording().resume(); } -- cgit v1.2.3