diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2008-04-10 17:43:25 +0000 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2008-04-10 17:43:25 +0000 |
commit | acc8ae40cdb2f57969ab57e1e8e6ec505a50d02b (patch) | |
tree | a996eb45ed4250bbf3575c8b0c19e568eb2e5c50 /indra/llmessage/llmessageconfig.cpp | |
parent | 3f08a67dc62ab88ced6baae18dae6b8818de6ced (diff) |
svn merge -r84490:84497 svn+ssh://svn/svn/linden/branches/DEV-11812-3
QAR-433 make max queued size on event queue configurable
Diffstat (limited to 'indra/llmessage/llmessageconfig.cpp')
-rw-r--r-- | indra/llmessage/llmessageconfig.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/indra/llmessage/llmessageconfig.cpp b/indra/llmessage/llmessageconfig.cpp index 550071fade..ed51019a22 100644 --- a/indra/llmessage/llmessageconfig.cpp +++ b/indra/llmessage/llmessageconfig.cpp @@ -66,6 +66,7 @@ public: /* virtual */ void loadFile(); void loadServerDefaults(const LLSD& data); + void loadMaxQueuedEvents(const LLSD& data); void loadMessages(const LLSD& data); void loadCapBans(const LLSD& blacklist); void loadMessageBans(const LLSD& blacklist); @@ -73,6 +74,7 @@ public: public: LLSD mCapBans; + S32 mMaxQueuedEvents; }; std::string LLMessageConfigFile::filename() @@ -112,6 +114,7 @@ void LLMessageConfigFile::loadFile() } } loadServerDefaults(data); + loadMaxQueuedEvents(data); loadMessages(data); loadCapBans(data); loadMessageBans(data); @@ -122,6 +125,19 @@ void LLMessageConfigFile::loadServerDefaults(const LLSD& data) mServerDefault = data["serverDefaults"][sServerName].asString(); } +const S32 DEFAULT_MAX_QUEUED_EVENTS = 100; +void LLMessageConfigFile::loadMaxQueuedEvents(const LLSD& data) +{ + if (data.has("maxQueuedEvents")) + { + mMaxQueuedEvents = data["maxQueuedEvents"].asInteger(); + } + else + { + mMaxQueuedEvents = DEFAULT_MAX_QUEUED_EVENTS; + } +} + void LLMessageConfigFile::loadMessages(const LLSD& data) { mMessages = data["messages"]; @@ -191,10 +207,10 @@ void LLMessageConfig::useConfig(const LLSD& config) { LLMessageConfigFile &the_file = LLMessageConfigFile::instance(); the_file.loadServerDefaults(config); + the_file.loadMaxQueuedEvents(config); the_file.loadMessages(config); the_file.loadCapBans(config); the_file.loadMessageBans(config); - } //static @@ -213,6 +229,13 @@ LLMessageConfig::Flavor LLMessageConfig::getServerDefaultFlavor() } //static +S32 LLMessageConfig::getMaxQueuedEvents() +{ + LLMessageConfigFile& file = LLMessageConfigFile::instance(); + return file.mMaxQueuedEvents; +} + +//static LLMessageConfig::Flavor LLMessageConfig::getMessageFlavor(const std::string& msg_name) { LLMessageConfigFile& file = LLMessageConfigFile::instance(); |