diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-10 13:46:16 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-10 13:46:16 -0500 |
commit | 6215fa4c136b240025851a7b1c73c284c2f399e4 (patch) | |
tree | 4b7d56d3bf4fc7f10cc4f8734d4ae518bc389cb6 /indra/newview/llcommandhandler.cpp | |
parent | 6b0c1f97f4c1c24d786d2d1a0171b883d21f447b (diff) | |
parent | 9b4d09471cca6922257a27ba9cb70498ab81fd94 (diff) |
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/newview/llcommandhandler.cpp')
-rw-r--r-- | indra/newview/llcommandhandler.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp index af6488388a..1d92661ea2 100644 --- a/indra/newview/llcommandhandler.cpp +++ b/indra/newview/llcommandhandler.cpp @@ -34,6 +34,7 @@ #include "llviewerprecompiledheaders.h" #include "llcommandhandler.h" +#include "llnotificationsutil.h" // system includes #include <boost/tokenizer.hpp> @@ -93,6 +94,8 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, LLMediaCtrl* web, bool trusted_browser) { + static bool slurl_blocked = false; + static bool slurl_throttled = false; static F64 last_throttle_time = 0.0; F64 cur_time = 0.0; std::map<std::string, LLCommandHandlerInfo>::iterator it = mMap.find(cmd); @@ -110,6 +113,11 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, // block request from external browser, but report as // "handled" because it was well formatted. LL_WARNS_ONCE("SLURL") << "Blocked SLURL command from untrusted browser" << LL_ENDL; + if (! slurl_blocked) + { + LLNotificationsUtil::add("BlockedSLURL"); + slurl_blocked = true; + } return true; case LLCommandHandler::UNTRUSTED_THROTTLE: @@ -119,6 +127,11 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, // block request from external browser if it happened // within THROTTLE_PERIOD secs of the last command LL_WARNS_ONCE("SLURL") << "Throttled SLURL command from untrusted browser" << LL_ENDL; + if (! slurl_throttled) + { + LLNotificationsUtil::add("ThrottledSLURL"); + slurl_throttled = true; + } return true; } last_throttle_time = cur_time; |