summaryrefslogtreecommitdiff
path: root/indra/newview/llimprocessing.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-10-09 19:32:19 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-10-09 19:32:19 +0300
commit12baf7587822bd6cd15885c45e973d0b7f9dceb4 (patch)
tree27ff68e9808f4b448bdb3b98da2c576f1dc4aa28 /indra/newview/llimprocessing.cpp
parent7829b4d3f46ff21d1d932b06f4721760ebbde014 (diff)
parentfe490d52b45679edf5740fa46fc3c76d608bfc95 (diff)
Downstream merge from lindenlab/viewer-manul
Diffstat (limited to 'indra/newview/llimprocessing.cpp')
-rw-r--r--indra/newview/llimprocessing.cpp35
1 files changed, 7 insertions, 28 deletions
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index 42043a03f2..24f40c8182 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -855,39 +855,18 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
}
else // IM_TASK_INVENTORY_OFFERED
{
- if (offline == IM_OFFLINE && session_id.isNull() && aux_id.notNull() && binary_bucket_size > sizeof(S8)* 5)
- {
- // cap received offline message
- std::string str_bucket = ll_safe_string((char*)binary_bucket, binary_bucket_size);
- 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;
}
+ // In the case of an offline message, the transaction id will be in aux_id and th session_id will be null
+ // (conversely when online the transaction id is passed as session_id)
+ info->mTransactionID = session_id.isNull() ? aux_id : session_id;
+
info->mIM = dialog;
info->mFromID = from_id;
info->mFromGroup = from_group;
- info->mTransactionID = session_id;
info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType));
info->mFromName = name;