FIRE-19415; Warn about messages with no body element.

meow-7.2.2
Nicky 2016-06-04 18:11:28 +02:00
parent 9da11f1db6
commit 2aad1ecd90
1 changed files with 11 additions and 1 deletions

View File

@ -40,6 +40,8 @@
#include "llcorehttputil.h"
#include "lleventfilter.h"
#include "llsdutil.h" // <FS:ND/> for ll_pretty_print_sd
namespace LLEventPolling
{
namespace Details
@ -103,7 +105,15 @@ namespace Details
std::string msg_name = content["message"];
LLSD message;
message["sender"] = mSenderIp;
message["body"] = content["body"];
// <FS:ND> Guard against messages with no "body"
// message["body"] = content["body"];
if( content.has( "body" ) )
message["body"] = content["body"];
else
LL_WARNS() << "Malformed content? " << ll_pretty_print_sd( content ) << LL_ENDL;
// <FS:ND>
LLMessageSystem::dispatch(msg_name, message);
}