diff options
author | Oz Linden <oz@lindenlab.com> | 2011-04-08 09:21:55 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-04-08 09:21:55 -0400 |
commit | c492bffaa6cd0d9bb05bbc3671c7658b7ba52862 (patch) | |
tree | 9bf24f8e6ae1207aef0cae78ae62f5509e5074e6 /indra/llcommon/llevents.cpp | |
parent | 3ffc5dc09c186fe0ac57ac66b33bfc105ca01363 (diff) | |
parent | 52615d251bc9261fe5765feefbcd31021bd75934 (diff) |
pull tags back from viewer-release
Diffstat (limited to 'indra/llcommon/llevents.cpp')
-rw-r--r-- | indra/llcommon/llevents.cpp | 13 |
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); +} |