summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2010-03-19 15:30:02 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2010-03-19 15:30:02 +0200
commit97a35b487545572ce9409e06bd54ad29f0da7114 (patch)
tree9e4968f4feb058196534c04eb5091efa18f1219c /indra/newview/llviewermessage.cpp
parent141f2aa9ee5f71134c1ac13815b7e54092ee4756 (diff)
parent978bf16797921d60351c09d9fc45721cceceb6e9 (diff)
Merged with viewer-offers
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 32edbec822..57a8ed5db2 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1084,6 +1084,21 @@ LLOfferInfo::LLOfferInfo(const LLSD& sd)
mHost = LLHost(sd["sender"].asString());
}
+LLOfferInfo::LLOfferInfo(const LLOfferInfo& info)
+{
+ mIM = info.mIM;
+ mFromID = info.mFromID;
+ mFromGroup = info.mFromGroup;
+ mFromObject = info.mFromObject;
+ mTransactionID = info.mTransactionID;
+ mFolderID = info.mFolderID;
+ mObjectID = info.mObjectID;
+ mType = info.mType;
+ mFromName = info.mFromName;
+ mDesc = info.mDesc;
+ mHost = info.mHost;
+}
+
LLSD LLOfferInfo::asLLSD()
{
LLSD sd;
@@ -1575,7 +1590,12 @@ void inventory_offer_handler(LLOfferInfo* info)
}
else // Agent -> Agent Inventory Offer
{
+ payload["reusable"] = true;
+ p.responder = info;
// Note: sets inventory_offer_callback as the callback
+ // *TODO fix memory leak
+ // inventory_offer_callback() is not invoked if user received notification and
+ // closes viewer(without responding the notification)
p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, info, _1, _2));
p.name = "UserGiveItem";
@@ -2303,6 +2323,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
payload["from_id"] = from_id;
payload["lure_id"] = session_id;
payload["godlike"] = FALSE;
+ payload["reusable"] = true;
LLNotificationsUtil::add("TeleportOffered", args, payload);
}
}
@@ -2371,6 +2392,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
else
{
+ payload["reusable"] = true;
args["[MESSAGE]"] = message;
LLNotificationsUtil::add("OfferFriendship", args, payload);
}