From d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:02 -0500 Subject: Second Life viewer sources 1.18.0.6 --- linden/indra/llmessage/llhttpsender.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'linden/indra/llmessage/llhttpsender.cpp') diff --git a/linden/indra/llmessage/llhttpsender.cpp b/linden/indra/llmessage/llhttpsender.cpp index f96e6d2..3796a52 100644 --- a/linden/indra/llmessage/llhttpsender.cpp +++ b/linden/indra/llmessage/llhttpsender.cpp @@ -40,6 +40,7 @@ namespace { typedef std::map SenderMap; static SenderMap senderMap; + static LLHTTPSender* defaultSender = new LLHTTPSender(); } //virtual @@ -69,11 +70,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); } @@ -88,3 +88,10 @@ void LLHTTPSender::clearSender(const LLHost& host) senderMap.erase(iter); } } + +//static +void LLHTTPSender::setDefaultSender(LLHTTPSender* sender) +{ + delete defaultSender; + defaultSender = sender; +} -- cgit v1.1