summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-05-27 21:17:22 +0000
committerNat Goodspeed <nat@lindenlab.com>2009-05-27 21:17:22 +0000
commitf910157c1662dedb9791efc1439ff09f1f3efbf8 (patch)
treeaaeff22de57e9080db219336dda81a346211aabd /indra/newview
parent657f8e45faf77b4c53b0d178b83cf2071744ee90 (diff)
DEV-31979: Introduce LLReqID, a class to help individual event API listeners
implement the ["reqid"] convention. This convention dictates that a response LLSD from each such API should contain a ["reqid"] key whose value echoes the ["reqid"] value, if any, in the request LLSD. Add LLReqID support to LLAresListener's "rewriteURI" service, LLSDMessage, LLCapabilityListener and LLXMLRPCListener.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llcapabilitylistener.cpp1
-rw-r--r--indra/newview/llxmlrpclistener.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llcapabilitylistener.cpp b/indra/newview/llcapabilitylistener.cpp
index 3277da8930..0a41ad614e 100644
--- a/indra/newview/llcapabilitylistener.cpp
+++ b/indra/newview/llcapabilitylistener.cpp
@@ -90,6 +90,7 @@ bool LLCapabilityListener::capListener(const LLSD& request)
// This capability is supported by the region to which we're talking.
LLHTTPClient::post(url, payload,
new LLSDMessage::EventResponder(LLEventPumps::instance(),
+ request,
mProvider.getDescription(),
cap, reply, error),
LLSD(), // headers
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index 2821e6c59f..71e2427c99 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -217,6 +217,7 @@ public:
/// populate an XMLRPC_REQUEST and an associated LLXMLRPCTransaction. Send
/// the request.
Poller(const LLSD& command):
+ mReqID(command),
mUri(command["uri"]),
mMethod(command["method"]),
mReplyPump(command["reply"])
@@ -325,7 +326,7 @@ public:
curlcode = CURLcode(curlint);
}
- LLSD data;
+ LLSD data(mReqID.makeResponse());
data["status"] = sStatusMapper.lookup(status);
data["errorcode"] = sCURLcodeMapper.lookup(curlcode);
data["error"] = "";
@@ -476,6 +477,7 @@ private:
return responses;
}
+ const LLReqID mReqID;
const std::string mUri;
const std::string mMethod;
const std::string mReplyPump;