summaryrefslogtreecommitdiff
path: root/indra/llcommon/llevents.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-04-13 12:03:53 -0400
committerOz Linden <oz@lindenlab.com>2011-04-13 12:03:53 -0400
commit6bdfc3d0482b3bbfb55abdb71220ea19391fbe14 (patch)
treee0557f36fe0f02e0fdeb2952d2477c01a7498a63 /indra/llcommon/llevents.cpp
parent19f356202a9516664c1cacb9b50e9b6e1e072375 (diff)
parentc77fcfb7a8aeb2f271b050171bf0d6a9bd4c955b (diff)
merge out changes up to but not including the STORM-610 change
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);
+}