summaryrefslogtreecommitdiff
path: root/indra/llcommon/llevents.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-05-10 13:57:41 -0600
committerXiaohong Bao <bao@lindenlab.com>2011-05-10 13:57:41 -0600
commit2a61d908e790bfd554f3f0968b320a6e2f4d42c4 (patch)
tree9e7cd6854a5e6b6c8d6cea31d9d4a8b8f649af7e /indra/llcommon/llevents.cpp
parente32d1cf7564dd38664781ea7360fa8daa132961c (diff)
parentb5c834c6fdcee7d7238bebfc561ecee3ecca3589 (diff)
Merge
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);
+}