diff options
| author | Oz Linden <oz@lindenlab.com> | 2011-04-06 07:32:56 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2011-04-06 07:32:56 -0400 |
| commit | f41cbc0ac85ae328f2701aab23e94c0ef7ab5758 (patch) | |
| tree | c0593e4d79918dc10173de5d3dfbb34e8c2ed40e /indra/llcommon/llevents.cpp | |
| parent | 85c97c19347c1409f8f7231940b0b8f3a57fc0a5 (diff) | |
| parent | b5c834c6fdcee7d7238bebfc561ecee3ecca3589 (diff) | |
merge changes for storm-1094
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); +} |
