diff options
author | Don Kjer <don@lindenlab.com> | 2011-02-19 00:17:12 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2011-02-19 00:17:12 +0000 |
commit | 8330a4d0fd046834a27a988102b439a6ec1f0aa2 (patch) | |
tree | 7fd2227522bf5c2377a45124cb50aad0afb90597 /indra/llcommon/llevents.cpp | |
parent | 3f5760b5ee4e422e11f3416133b7a4c3a73b1d8c (diff) | |
parent | 18bf5f09b22a2c36ccf543104b1115a7b0b9db71 (diff) |
Merge of ssh://hg.lindenlab.com/nat/viewer-eventapi2/
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); +} |