summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2020-07-01 16:52:44 -0700
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-07-02 19:05:12 +0300
commit766b21a0a624ffb75c06801cf8ea3573e6dc4b5d (patch)
tree78a85960319a324e89a1219285fded6965316810 /indra
parent01f2308c85dd02d199072006e6b9ff42c90a1986 (diff)
SL-13533: Use the old name for from_agent_name
SL-13540: Do not fail if binary bucket is too large, attempt to extract the asset type from the old style bucket. Notification still not shown.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimprocessing.cpp29
1 files changed, 22 insertions, 7 deletions
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index fc209c2eae..301b4c9214 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -857,13 +857,28 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
}
else // IM_TASK_INVENTORY_OFFERED
{
- if (sizeof(S8) != binary_bucket_size)
+ 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];
+ }
+ else
+ {
+ /*RIDER*/ // The previous version of the protocol returned the wrong binary bucket... we
+ // still might be able to figure out the type... even though the offer is not retrievable.
+ std::string str_bucket(reinterpret_cast<char *>(binary_bucket));
+ std::string str_type(str_bucket.substr(0, str_bucket.find('|')));
+
+ std::stringstream type_convert(str_type);
+
+ S32 type;
+ type_convert >> type;
+
+ // We could try AT_UNKNOWN which would be more accurate, but that causes an auto decline
+ info->mType = static_cast<LLAssetType::EType>(type);
+ // Don't break in the case of a bad binary bucket. Go ahead and show the
+ // accept/decline popup even though it will not do anything.
+ LL_WARNS("Messaging") << "Malformed inventory offer from object, type might be " << info->mType << LL_ENDL;
}
- info->mType = (LLAssetType::EType) binary_bucket[0];
info->mObjectID = LLUUID::null;
info->mFromObject = TRUE;
}
@@ -1601,8 +1616,8 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url)
static_cast<EInstantMessage>(message_data["dialog"].asInteger()),
message_data["transaction-id"].asUUID(),
static_cast<U32>(message_data["timestamp"].asInteger()),
- message_data["from_name"].asString(),
- (message_data.has("message")) ? message_data["message"].asString() : std::string(),
+ message_data["from_agent_name"].asString(),
+ message_data["message"].asString(),
static_cast<U32>((message_data.has("parent_estate_id")) ? message_data["parent_estate_id"].asInteger() : 1), // 1 - IMMainland
message_data["region_id"].asUUID(),
position,