summaryrefslogtreecommitdiff
path: root/indra/llcommon/llevents.cpp
diff options
context:
space:
mode:
authornat-goodspeed <nat@lindenlab.com>2024-03-25 12:35:48 -0400
committerGitHub <noreply@github.com>2024-03-25 12:35:48 -0400
commit2eb6901c7c9ae87a588d99399e4b41640e4c4881 (patch)
tree6621d8e565119a131af1edc9397039f7af6be8b2 /indra/llcommon/llevents.cpp
parent7bf84bdcbf13084ff3b94590e4061b4a6708b4dc (diff)
parentfd8c5fced1ee62e08c55adf92fb9c8d0e52d313a (diff)
Merge pull request #1038 from secondlife/lua-fiber
Add fiber.lua, which permits calling leap.request() even from Lua's main thread.
Diffstat (limited to 'indra/llcommon/llevents.cpp')
-rw-r--r--indra/llcommon/llevents.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 01bba7a620..667e047fd3 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -726,7 +726,7 @@ void LLReqID::stamp(LLSD& response) const
response["reqid"] = mReqid;
}
-bool sendReply(const LLSD& reply, const LLSD& request, const std::string& replyKey)
+bool sendReply(LLSD reply, const LLSD& request, const std::string& replyKey)
{
// If the original request has no value for replyKey, it's pointless to
// construct or send a reply event: on which LLEventPump should we send
@@ -739,13 +739,10 @@ bool sendReply(const LLSD& reply, const LLSD& request, const std::string& replyK
// Here the request definitely contains replyKey; reasonable to proceed.
- // 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);
+ // and copy it to 'reply'.
+ reqID.stamp(reply);
+ // Send reply on LLEventPump named in request[replyKey].
+ return LLEventPumps::instance().obtain(request[replyKey]).post(reply);
}