summaryrefslogtreecommitdiff
path: root/indra/llcommon/llevents.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2011-04-20 11:26:12 -0400
committerLoren Shih <seraph@lindenlab.com>2011-04-20 11:26:12 -0400
commitb68d1a0f50c073257fb48692b666bb692d0c9981 (patch)
tree46ca2d8a49a2fd8dc3d98db6da926faf84c31b8a /indra/llcommon/llevents.cpp
parent6715603b6a991f822274b000e5d8fb9b8d405464 (diff)
parentda7cd9f8117757cd6acb0a5e93bc3c60443374f9 (diff)
Merge viewer-pre-beta -> seraph-viewer-pre-beta
Diffstat (limited to 'indra/llcommon/llevents.cpp')
-rw-r--r--indra/llcommon/llevents.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 97e2bdeb57..ff03506e84 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -588,3 +588,16 @@ void LLReqID::stamp(LLSD& response) const
}
response["reqid"] = mReqid;
}
+
+bool sendReply(const LLSD& reply, const LLSD& request, const std::string& replyKey)
+{
+ // Copy 'reply' to modify it.
+ LLSD newreply(reply);
+ // Get the ["reqid"] element from request
+ LLReqID reqID(request);
+ // and copy it to 'newreply'.
+ reqID.stamp(newreply);
+ // Send reply on LLEventPump named in request[replyKey]. Don't forget to
+ // send the modified 'newreply' instead of the original 'reply'.
+ return LLEventPumps::instance().obtain(request[replyKey]).post(newreply);
+}