diff options
Diffstat (limited to 'linden/indra/llmessage/llhttpsender.cpp')
-rw-r--r-- | linden/indra/llmessage/llhttpsender.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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 | |||
40 | { | 40 | { |
41 | typedef std::map<LLHost, LLHTTPSender*> SenderMap; | 41 | typedef std::map<LLHost, LLHTTPSender*> SenderMap; |
42 | static SenderMap senderMap; | 42 | static SenderMap senderMap; |
43 | static LLHTTPSender* defaultSender = new LLHTTPSender(); | ||
43 | } | 44 | } |
44 | 45 | ||
45 | //virtual | 46 | //virtual |
@@ -69,11 +70,10 @@ void LLHTTPSender::setSender(const LLHost& host, LLHTTPSender* sender) | |||
69 | //static | 70 | //static |
70 | const LLHTTPSender& LLHTTPSender::getSender(const LLHost& host) | 71 | const LLHTTPSender& LLHTTPSender::getSender(const LLHost& host) |
71 | { | 72 | { |
72 | static LLHTTPSender defaultSender; | ||
73 | SenderMap::const_iterator iter = senderMap.find(host); | 73 | SenderMap::const_iterator iter = senderMap.find(host); |
74 | if(iter == senderMap.end()) | 74 | if(iter == senderMap.end()) |
75 | { | 75 | { |
76 | return defaultSender; | 76 | return *defaultSender; |
77 | } | 77 | } |
78 | return *(iter->second); | 78 | return *(iter->second); |
79 | } | 79 | } |
@@ -88,3 +88,10 @@ void LLHTTPSender::clearSender(const LLHost& host) | |||
88 | senderMap.erase(iter); | 88 | senderMap.erase(iter); |
89 | } | 89 | } |
90 | } | 90 | } |
91 | |||
92 | //static | ||
93 | void LLHTTPSender::setDefaultSender(LLHTTPSender* sender) | ||
94 | { | ||
95 | delete defaultSender; | ||
96 | defaultSender = sender; | ||
97 | } | ||