diff options
author | Dave Parks <davep@lindenlab.com> | 2011-04-19 16:35:37 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-04-19 16:35:37 -0500 |
commit | 5cf5e4bb888e67dc1dd79eaec491b242a7f3a903 (patch) | |
tree | 7b43bff3ea4e1309c6ae4b9bd1fd8ada251f7a52 /indra/llcommon/llevents.cpp | |
parent | 25566075980d45c30ee25603d94454e081119210 (diff) | |
parent | 3b5d6eed12d928e5a7a0bc3a8d827f676b25d060 (diff) |
merge
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); +} |