diff options
author | Aura Linden <aura@lindenlab.com> | 2014-03-27 11:59:35 -0700 |
---|---|---|
committer | Aura Linden <aura@lindenlab.com> | 2014-03-27 11:59:35 -0700 |
commit | dfd78e83d91832b486a5bba6b1bb1cce621163ab (patch) | |
tree | 5d27537583ea1f06c0e7b469f83ed65c93f70d15 /indra/llmessage/message.cpp | |
parent | 22ea5ac41ca3a1f7a884b56526791f611834f76b (diff) | |
parent | 31a3a3da5db077c4d9b8fe06a18de98c822db6ab (diff) |
Pulled merge from release
Diffstat (limited to 'indra/llmessage/message.cpp')
-rwxr-xr-x | indra/llmessage/message.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index ae95087377..c3642ccbe8 100755 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -3032,12 +3032,23 @@ void LLMessageSystem::setExceptionFunc(EMessageException e, BOOL LLMessageSystem::callExceptionFunc(EMessageException exception) { callbacks_t::iterator it = mExceptionCallbacks.find(exception); - if(it != mExceptionCallbacks.end()) + if(it == mExceptionCallbacks.end()) { - ((*it).second.first)(this, (*it).second.second,exception); - return TRUE; + return FALSE; } - return FALSE; + + exception_t& ex = it->second; + msg_exception_callback ex_cb = ex.first; + + if (!ex_cb) + { + LL_WARNS("Messaging") << "LLMessageSystem::callExceptionFunc: bad message exception callback." << llendl; + return FALSE; + } + + (ex_cb)(this, ex.second, exception); + + return TRUE; } void LLMessageSystem::setTimingFunc(msg_timing_callback func, void* data) |