aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage/llmessageconfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llmessage/llmessageconfig.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/linden/indra/llmessage/llmessageconfig.cpp b/linden/indra/llmessage/llmessageconfig.cpp
index e23ed07..498cfff 100644
--- a/linden/indra/llmessage/llmessageconfig.cpp
+++ b/linden/indra/llmessage/llmessageconfig.cpp
@@ -52,13 +52,14 @@ static LLSD sMessages;
52class LLMessageConfigFile : public LLLiveFile 52class LLMessageConfigFile : public LLLiveFile
53{ 53{
54public: 54public:
55 LLMessageConfigFile() 55 LLMessageConfigFile() :
56 : LLLiveFile(filename(), messageConfigRefreshRate) 56 LLLiveFile(filename(), messageConfigRefreshRate),
57 mMaxQueuedEvents(0)
57 { } 58 { }
58 59
59 static std::string filename(); 60 static std::string filename();
60 61
61 LLSD mMessages; 62 LLSD mMessages;
62 std::string mServerDefault; 63 std::string mServerDefault;
63 64
64 static LLMessageConfigFile& instance(); 65 static LLMessageConfigFile& instance();
@@ -66,7 +67,7 @@ public:
66 67
67 /* virtual */ void loadFile(); 68 /* virtual */ void loadFile();
68 void loadServerDefaults(const LLSD& data); 69 void loadServerDefaults(const LLSD& data);
69 void loadMaxQueuedEvents(const LLSD& data); 70 void loadMaxQueuedEvents(const LLSD& data);
70 void loadMessages(const LLSD& data); 71 void loadMessages(const LLSD& data);
71 void loadCapBans(const LLSD& blacklist); 72 void loadCapBans(const LLSD& blacklist);
72 void loadMessageBans(const LLSD& blacklist); 73 void loadMessageBans(const LLSD& blacklist);
@@ -74,7 +75,10 @@ public:
74 75
75public: 76public:
76 LLSD mCapBans; 77 LLSD mCapBans;
77 S32 mMaxQueuedEvents; 78 S32 mMaxQueuedEvents;
79
80private:
81 static const S32 DEFAULT_MAX_QUEUED_EVENTS = 100;
78}; 82};
79 83
80std::string LLMessageConfigFile::filename() 84std::string LLMessageConfigFile::filename()
@@ -97,7 +101,7 @@ void LLMessageConfigFile::loadFile()
97{ 101{
98 LLSD data; 102 LLSD data;
99 { 103 {
100 llifstream file(filename().c_str()); 104 llifstream file(filename());
101 105
102 if (file.is_open()) 106 if (file.is_open())
103 { 107 {
@@ -125,7 +129,6 @@ void LLMessageConfigFile::loadServerDefaults(const LLSD& data)
125 mServerDefault = data["serverDefaults"][sServerName].asString(); 129 mServerDefault = data["serverDefaults"][sServerName].asString();
126} 130}
127 131
128const S32 DEFAULT_MAX_QUEUED_EVENTS = 100;
129void LLMessageConfigFile::loadMaxQueuedEvents(const LLSD& data) 132void LLMessageConfigFile::loadMaxQueuedEvents(const LLSD& data)
130{ 133{
131 if (data.has("maxQueuedEvents")) 134 if (data.has("maxQueuedEvents"))