summaryrefslogtreecommitdiff
path: root/indra/llmessage/llhttpsender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage/llhttpsender.cpp')
-rw-r--r--indra/llmessage/llhttpsender.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/llmessage/llhttpsender.cpp b/indra/llmessage/llhttpsender.cpp
index 4152dedae5..b9fd8ecbf7 100644
--- a/indra/llmessage/llhttpsender.cpp
+++ b/indra/llmessage/llhttpsender.cpp
@@ -20,6 +20,7 @@ namespace
{
typedef std::map<LLHost, LLHTTPSender*> SenderMap;
static SenderMap senderMap;
+ static LLHTTPSender* defaultSender = new LLHTTPSender();
}
//virtual
@@ -49,11 +50,10 @@ void LLHTTPSender::setSender(const LLHost& host, LLHTTPSender* sender)
//static
const LLHTTPSender& LLHTTPSender::getSender(const LLHost& host)
{
- static LLHTTPSender defaultSender;
SenderMap::const_iterator iter = senderMap.find(host);
if(iter == senderMap.end())
{
- return defaultSender;
+ return *defaultSender;
}
return *(iter->second);
}
@@ -68,3 +68,10 @@ void LLHTTPSender::clearSender(const LLHost& host)
senderMap.erase(iter);
}
}
+
+//static
+void LLHTTPSender::setDefaultSender(LLHTTPSender* sender)
+{
+ delete defaultSender;
+ defaultSender = sender;
+}