diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2011-02-21 15:44:16 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2011-02-21 15:44:16 -0500 |
commit | dbaef6ef1fa6461373cd7117f20f5b8fd4e8db6c (patch) | |
tree | 3d02f98489fd74488b38cdef80d327b9e24233fd /indra/llcommon/llevents.cpp | |
parent | 1a79aeca54db6ee5bf1fb2968c2642f8a3306091 (diff) | |
parent | 25d754c26b8ee749b805d5fa0d1b0d7971756a4b (diff) |
Automated merge with http://hg.secondlife.com/viewer-development
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); +} |