diff options
author | Rider Linden <rider@lindenlab.com> | 2015-08-12 16:32:49 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-08-12 16:32:49 -0700 |
commit | 248d61fe0eadd128c7704e37922ba7fdef35d630 (patch) | |
tree | 47597f9a1d4a1a3dc774c9f10f3d6d74338c5322 /indra/llcorehttp/httprequest.cpp | |
parent | 14a8c70867252926fdfc42728c1de38c8ef68706 (diff) |
MAINT-5500: Finish converting the AIS responders to the new coroutine model, Cleaned up dead an unused code.
MAINT-4952: Added COPY and MOVE methods to Core:Http adapter
Diffstat (limited to 'indra/llcorehttp/httprequest.cpp')
-rwxr-xr-x | indra/llcorehttp/httprequest.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/indra/llcorehttp/httprequest.cpp b/indra/llcorehttp/httprequest.cpp index f0dfde6153..63233259fb 100755 --- a/indra/llcorehttp/httprequest.cpp +++ b/indra/llcorehttp/httprequest.cpp @@ -419,6 +419,37 @@ HttpHandle HttpRequest::requestCopy(policy_t policy_id, return handle; } +HttpHandle HttpRequest::requestMove(policy_t policy_id, + priority_t priority, + const std::string & url, + const HttpOptions::ptr_t & options, + const HttpHeaders::ptr_t & headers, + HttpHandler * user_handler) +{ + HttpStatus status; + HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); + + HttpOpRequest * op = new HttpOpRequest(); + if (!(status = op->setupMove(policy_id, priority, url, options, headers))) + { + op->release(); + mLastReqStatus = status; + return handle; + } + op->setReplyPath(mReplyQueue, user_handler); + if (!(status = mRequestQueue->addOp(op))) // transfers refcount + { + op->release(); + mLastReqStatus = status; + return handle; + } + + mLastReqStatus = status; + handle = static_cast<HttpHandle>(op); + + return handle; +} + HttpHandle HttpRequest::requestNoOp(HttpHandler * user_handler) { |