summaryrefslogtreecommitdiff
path: root/indra/viewer_components/updater/llupdatechecker.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-10-03 14:30:21 -0500
committerDave Parks <davep@lindenlab.com>2012-10-03 14:30:21 -0500
commit374f20edf09ff8194c715d190c114eaacac00bfe (patch)
tree33298ef11da59528edde26fa476ba113f40b0887 /indra/viewer_components/updater/llupdatechecker.cpp
parent05dbd7dafe0e060e82aeedb5404101367bd4c622 (diff)
Fix non-thread-safe refcounting of LLHTTPClient::Responder and fix out-of-order deletion of LLTextureFetch on shutdown
Diffstat (limited to 'indra/viewer_components/updater/llupdatechecker.cpp')
-rw-r--r--indra/viewer_components/updater/llupdatechecker.cpp39
1 files changed, 1 insertions, 38 deletions
diff --git a/indra/viewer_components/updater/llupdatechecker.cpp b/indra/viewer_components/updater/llupdatechecker.cpp
index 4da774a5f6..5edbbf9914 100644
--- a/indra/viewer_components/updater/llupdatechecker.cpp
+++ b/indra/viewer_components/updater/llupdatechecker.cpp
@@ -51,37 +51,6 @@ public:
};
-class LLUpdateChecker::Implementation:
- public LLHTTPClient::Responder
-{
-public:
- Implementation(Client & client);
- ~Implementation();
- void checkVersion(std::string const & protocolVersion, std::string const & hostUrl,
- std::string const & servicePath, std::string channel, std::string version);
-
- // Responder:
- virtual void completed(U32 status,
- const std::string & reason,
- const LLSD& content);
- virtual void error(U32 status, const std::string & reason);
-
-private:
- static const char * sProtocolVersion;
-
- Client & mClient;
- LLHTTPClient mHttpClient;
- bool mInProgress;
- std::string mVersion;
-
- std::string buildUrl(std::string const & protocolVersion, std::string const & hostUrl,
- std::string const & servicePath, std::string channel, std::string version);
-
- LOG_CLASS(LLUpdateChecker::Implementation);
-};
-
-
-
// LLUpdateChecker
//-----------------------------------------------------------------------------
@@ -134,13 +103,7 @@ void LLUpdateChecker::Implementation::checkVersion(std::string const & protocolV
std::string checkUrl = buildUrl(protocolVersion, hostUrl, servicePath, channel, version);
LL_INFOS("UpdateCheck") << "checking for updates at " << checkUrl << llendl;
- // The HTTP client will wrap a raw pointer in a boost::intrusive_ptr causing the
- // passed object to be silently and automatically deleted. We pass a self-
- // referential intrusive pointer to which we add a reference to keep the
- // client from deleting the update checker implementation instance.
- LLHTTPClient::ResponderPtr temporaryPtr(this);
- boost::intrusive_ptr_add_ref(temporaryPtr.get());
- mHttpClient.get(checkUrl, temporaryPtr);
+ mHttpClient.get(checkUrl, this);
}
void LLUpdateChecker::Implementation::completed(U32 status,