Skip to content
Snippets Groups Projects
Commit ab0d3f09 authored by andreykproductengine's avatar andreykproductengine
Browse files

SL-9975 All offline inventory offers from scripted objects are lost

parent e867e619
No related branches found
No related tags found
No related merge requests found
...@@ -854,15 +854,33 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, ...@@ -854,15 +854,33 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
} }
else // IM_TASK_INVENTORY_OFFERED else // IM_TASK_INVENTORY_OFFERED
{ {
if (sizeof(S8) != binary_bucket_size) if (offline == IM_OFFLINE && session_id.isNull() && aux_id.notNull() && binary_bucket_size > sizeof(S8)* 5)
{ {
LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL; // cap received offline message
delete info; std::string str_bucket = ll_safe_string((char*)binary_bucket, binary_bucket_size);
break; typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
boost::char_separator<char> sep("|", "", boost::keep_empty_tokens);
tokenizer tokens(str_bucket, sep);
tokenizer::iterator iter = tokens.begin();
info->mType = (LLAssetType::EType)(atoi((*(iter++)).c_str()));
// Note There is more elements in 'tokens' ...
info->mObjectID = LLUUID::null;
info->mFromObject = TRUE;
}
else
{
if (sizeof(S8) != binary_bucket_size)
{
LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL;
delete info;
break;
}
info->mType = (LLAssetType::EType) binary_bucket[0];
info->mObjectID = LLUUID::null;
info->mFromObject = TRUE;
} }
info->mType = (LLAssetType::EType) binary_bucket[0];
info->mObjectID = LLUUID::null;
info->mFromObject = TRUE;
} }
info->mIM = dialog; info->mIM = dialog;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment