diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-05-22 19:04:52 +0200 |
---|---|---|
committer | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-05-22 19:04:52 +0200 |
commit | 1b67dd855c41f5a0cda7ec2a68d98071986ca703 (patch) | |
tree | ab243607f74f78200787bba5b9b88f07ef1b966f /indra/llcorehttp/_httpoperation.cpp | |
parent | 6d6eabca44d08d5b97bfe3e941d2b9687c2246ea (diff) | |
parent | e1623bb276f83a43ce7a197e388720c05bdefe61 (diff) |
Merge remote-tracking branch 'origin/main' into DRTVWR-600-maint-A
# Conflicts:
# autobuild.xml
# indra/cmake/CMakeLists.txt
# indra/cmake/GoogleMock.cmake
# indra/llaudio/llaudioengine_fmodstudio.cpp
# indra/llaudio/llaudioengine_fmodstudio.h
# indra/llaudio/lllistener_fmodstudio.cpp
# indra/llaudio/lllistener_fmodstudio.h
# indra/llaudio/llstreamingaudio_fmodstudio.cpp
# indra/llaudio/llstreamingaudio_fmodstudio.h
# indra/llcharacter/llmultigesture.cpp
# indra/llcharacter/llmultigesture.h
# indra/llimage/llimage.cpp
# indra/llimage/llimagepng.cpp
# indra/llimage/llimageworker.cpp
# indra/llimage/tests/llimageworker_test.cpp
# indra/llmessage/tests/llmockhttpclient.h
# indra/llprimitive/llgltfmaterial.h
# indra/llrender/llfontfreetype.cpp
# indra/llui/llcombobox.cpp
# indra/llui/llfolderview.cpp
# indra/llui/llfolderviewmodel.h
# indra/llui/lllineeditor.cpp
# indra/llui/lllineeditor.h
# indra/llui/lltextbase.cpp
# indra/llui/lltextbase.h
# indra/llui/lltexteditor.cpp
# indra/llui/lltextvalidate.cpp
# indra/llui/lltextvalidate.h
# indra/llui/lluictrl.h
# indra/llui/llview.cpp
# indra/llwindow/llwindowmacosx.cpp
# indra/newview/app_settings/settings.xml
# indra/newview/llappearancemgr.cpp
# indra/newview/llappearancemgr.h
# indra/newview/llavatarpropertiesprocessor.cpp
# indra/newview/llavatarpropertiesprocessor.h
# indra/newview/llbreadcrumbview.cpp
# indra/newview/llbreadcrumbview.h
# indra/newview/llbreastmotion.cpp
# indra/newview/llbreastmotion.h
# indra/newview/llconversationmodel.h
# indra/newview/lldensityctrl.cpp
# indra/newview/lldensityctrl.h
# indra/newview/llface.inl
# indra/newview/llfloatereditsky.cpp
# indra/newview/llfloatereditwater.cpp
# indra/newview/llfloateremojipicker.h
# indra/newview/llfloaterimsessiontab.cpp
# indra/newview/llfloaterprofiletexture.cpp
# indra/newview/llfloaterprofiletexture.h
# indra/newview/llgesturemgr.cpp
# indra/newview/llgesturemgr.h
# indra/newview/llimpanel.cpp
# indra/newview/llimpanel.h
# indra/newview/llinventorybridge.cpp
# indra/newview/llinventorybridge.h
# indra/newview/llinventoryclipboard.cpp
# indra/newview/llinventoryclipboard.h
# indra/newview/llinventoryfunctions.cpp
# indra/newview/llinventoryfunctions.h
# indra/newview/llinventorygallery.cpp
# indra/newview/lllistbrowser.cpp
# indra/newview/lllistbrowser.h
# indra/newview/llpanelobjectinventory.cpp
# indra/newview/llpanelprofile.cpp
# indra/newview/llpanelprofile.h
# indra/newview/llpreviewgesture.cpp
# indra/newview/llsavedsettingsglue.cpp
# indra/newview/llsavedsettingsglue.h
# indra/newview/lltooldraganddrop.cpp
# indra/newview/llurllineeditorctrl.cpp
# indra/newview/llvectorperfoptions.cpp
# indra/newview/llvectorperfoptions.h
# indra/newview/llviewerparceloverlay.cpp
# indra/newview/llviewertexlayer.cpp
# indra/newview/llviewertexturelist.cpp
# indra/newview/macmain.h
# indra/test/test.cpp
Diffstat (limited to 'indra/llcorehttp/_httpoperation.cpp')
-rw-r--r-- | indra/llcorehttp/_httpoperation.cpp | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/indra/llcorehttp/_httpoperation.cpp b/indra/llcorehttp/_httpoperation.cpp index c3a9bcaf54..2f6c3fce56 100644 --- a/indra/llcorehttp/_httpoperation.cpp +++ b/indra/llcorehttp/_httpoperation.cpp @@ -53,9 +53,9 @@ namespace LLCore // ================================== // HttpOperation // ================================== -/*static*/ +/*static*/ HttpOperation::handleMap_t HttpOperation::mHandleMap; -LLCoreInt::HttpMutex HttpOperation::mOpMutex; +LLCoreInt::HttpMutex HttpOperation::mOpMutex; HttpOperation::HttpOperation(): std::enable_shared_from_this<HttpOperation>(), @@ -65,7 +65,7 @@ HttpOperation::HttpOperation(): mTracing(HTTP_TRACE_OFF), mMyHandle(LLCORE_HTTP_HANDLE_INVALID) { - mMetricCreated = totalTime(); + mMetricCreated = totalTime(); } @@ -78,63 +78,63 @@ HttpOperation::~HttpOperation() void HttpOperation::setReplyPath(HttpReplyQueue::ptr_t reply_queue, - HttpHandler::ptr_t user_handler) + HttpHandler::ptr_t user_handler) { mReplyQueue.swap(reply_queue); - mUserHandler.swap(user_handler); + mUserHandler.swap(user_handler); } void HttpOperation::stageFromRequest(HttpService *) { - // Default implementation should never be called. This - // indicates an operation making a transition that isn't - // defined. - LL_ERRS(LOG_CORE) << "Default stageFromRequest method may not be called." - << LL_ENDL; + // Default implementation should never be called. This + // indicates an operation making a transition that isn't + // defined. + LL_ERRS(LOG_CORE) << "Default stageFromRequest method may not be called." + << LL_ENDL; } void HttpOperation::stageFromReady(HttpService *) { - // Default implementation should never be called. This - // indicates an operation making a transition that isn't - // defined. - LL_ERRS(LOG_CORE) << "Default stageFromReady method may not be called." - << LL_ENDL; + // Default implementation should never be called. This + // indicates an operation making a transition that isn't + // defined. + LL_ERRS(LOG_CORE) << "Default stageFromReady method may not be called." + << LL_ENDL; } void HttpOperation::stageFromActive(HttpService *) { - // Default implementation should never be called. This - // indicates an operation making a transition that isn't - // defined. - LL_ERRS(LOG_CORE) << "Default stageFromActive method may not be called." - << LL_ENDL; + // Default implementation should never be called. This + // indicates an operation making a transition that isn't + // defined. + LL_ERRS(LOG_CORE) << "Default stageFromActive method may not be called." + << LL_ENDL; } void HttpOperation::visitNotifier(HttpRequest *) { - if (mUserHandler) - { - HttpResponse * response = new HttpResponse(); + if (mUserHandler) + { + HttpResponse * response = new HttpResponse(); - response->setStatus(mStatus); - mUserHandler->onCompleted(getHandle(), response); + response->setStatus(mStatus); + mUserHandler->onCompleted(getHandle(), response); - response->release(); - } + response->release(); + } } HttpStatus HttpOperation::cancel() { - HttpStatus status; + HttpStatus status; - return status; + return status; } // Handle methods @@ -196,25 +196,25 @@ HttpOperation::ptr_t HttpOperation::findByHandle(HttpHandle handle) if (!weak.expired()) return weak.lock(); - + return ptr_t(); } void HttpOperation::addAsReply() { - if (mTracing > HTTP_TRACE_OFF) - { - LL_INFOS(LOG_CORE) << "TRACE, ToReplyQueue, Handle: " - << getHandle() - << LL_ENDL; - } - - if (mReplyQueue) - { + if (mTracing > HTTP_TRACE_OFF) + { + LL_INFOS(LOG_CORE) << "TRACE, ToReplyQueue, Handle: " + << getHandle() + << LL_ENDL; + } + + if (mReplyQueue) + { HttpOperation::ptr_t op = shared_from_this(); - mReplyQueue->addOp(op); - } + mReplyQueue->addOp(op); + } } @@ -224,7 +224,7 @@ void HttpOperation::addAsReply() HttpOpStop::HttpOpStop() - : HttpOperation() + : HttpOperation() {} @@ -234,11 +234,11 @@ HttpOpStop::~HttpOpStop() void HttpOpStop::stageFromRequest(HttpService * service) { - // Do operations - service->stopRequested(); - - // Prepare response if needed - addAsReply(); + // Do operations + service->stopRequested(); + + // Prepare response if needed + addAsReply(); } @@ -248,7 +248,7 @@ void HttpOpStop::stageFromRequest(HttpService * service) HttpOpNull::HttpOpNull() - : HttpOperation() + : HttpOperation() {} @@ -258,13 +258,13 @@ HttpOpNull::~HttpOpNull() void HttpOpNull::stageFromRequest(HttpService * service) { - // Perform op - // Nothing to perform. This doesn't fall into the libcurl - // ready/active queues, it just bounces over to the reply - // queue directly. - - // Prepare response if needed - addAsReply(); + // Perform op + // Nothing to perform. This doesn't fall into the libcurl + // ready/active queues, it just bounces over to the reply + // queue directly. + + // Prepare response if needed + addAsReply(); } @@ -274,8 +274,8 @@ void HttpOpNull::stageFromRequest(HttpService * service) HttpOpSpin::HttpOpSpin(int mode) - : HttpOperation(), - mMode(mode) + : HttpOperation(), + mMode(mode) {} @@ -285,20 +285,20 @@ HttpOpSpin::~HttpOpSpin() void HttpOpSpin::stageFromRequest(HttpService * service) { - if (0 == mMode) - { - // Spin forever - while (true) - { - ms_sleep(100); - } - } - else - { - ms_sleep(1); // backoff interlock plumbing a bit + if (0 == mMode) + { + // Spin forever + while (true) + { + ms_sleep(100); + } + } + else + { + ms_sleep(1); // backoff interlock plumbing a bit HttpOperation::ptr_t opptr = shared_from_this(); service->getRequestQueue().addOp(opptr); - } + } } |