Skip to content
Snippets Groups Projects
Commit 3feba8be authored by Rider Linden's avatar Rider Linden
Browse files

SL-11430: Transaction ID is passed as aux_id from offline message. No special...

SL-11430: Transaction ID is passed as aux_id from offline message.  No special parsing required to get type from binary_bucket.
parent 23932e2f
No related branches found
No related tags found
No related merge requests found
...@@ -854,39 +854,18 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, ...@@ -854,39 +854,18 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
} }
else // IM_TASK_INVENTORY_OFFERED else // IM_TASK_INVENTORY_OFFERED
{ {
if (offline == IM_OFFLINE && session_id.isNull() && aux_id.notNull() && binary_bucket_size > sizeof(S8)* 5) info->mType = (LLAssetType::EType) binary_bucket[0];
{ info->mObjectID = LLUUID::null;
// cap received offline message info->mFromObject = TRUE;
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;
}
} }
// 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->mIM = dialog;
info->mFromID = from_id; info->mFromID = from_id;
info->mFromGroup = from_group; info->mFromGroup = from_group;
info->mTransactionID = session_id;
info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType)); info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType));
info->mFromName = name; info->mFromName = name;
......
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