summaryrefslogtreecommitdiff
path: root/indra/llcommon/llevents.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2011-03-21 17:40:49 -0400
committerNat Goodspeed <nat@lindenlab.com>2011-03-21 17:40:49 -0400
commitfa4359e571fb67aca651efc3403274cdf0bb2616 (patch)
tree029261cf0981e0472f2bd34bbae20dbcfbc26925 /indra/llcommon/llevents.cpp
parent3f3429fa6854c6462abf3bbabf4af1dbbeb4c337 (diff)
parentb9a9b0017dd4714cbca4b0ddb69ed5e6b2f09528 (diff)
STORM-1051: merge daggy fix to tip
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);
+}