diff options
author | Oz Linden <oz@lindenlab.com> | 2016-04-04 15:53:09 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2016-04-04 15:53:09 -0400 |
commit | 9be58e915a6c69de280ccabd3019e9ac40beed26 (patch) | |
tree | ad6f8f1f754a865afb761d0f17744cc7e1ef8b74 /indra/llcorehttp/_httprequestqueue.cpp | |
parent | ab46c9226bd9048fa218f54bc8668594401529e7 (diff) | |
parent | 18928ea6c6f2830a0d45ec412c915eceff1b76b0 (diff) |
merge with 4.0.3-release
Diffstat (limited to 'indra/llcorehttp/_httprequestqueue.cpp')
-rw-r--r-- | indra/llcorehttp/_httprequestqueue.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/indra/llcorehttp/_httprequestqueue.cpp b/indra/llcorehttp/_httprequestqueue.cpp index c16966d078..c6f4ad789f 100644 --- a/indra/llcorehttp/_httprequestqueue.cpp +++ b/indra/llcorehttp/_httprequestqueue.cpp @@ -47,12 +47,7 @@ HttpRequestQueue::HttpRequestQueue() HttpRequestQueue::~HttpRequestQueue() { - while (! mQueue.empty()) - { - HttpOperation * op = mQueue.back(); - mQueue.pop_back(); - op->release(); - } + mQueue.clear(); } @@ -73,7 +68,7 @@ void HttpRequestQueue::term() } -HttpStatus HttpRequestQueue::addOp(HttpOperation * op) +HttpStatus HttpRequestQueue::addOp(const HttpRequestQueue::opPtr_t &op) { bool wake(false); { @@ -95,9 +90,9 @@ HttpStatus HttpRequestQueue::addOp(HttpOperation * op) } -HttpOperation * HttpRequestQueue::fetchOp(bool wait) +HttpRequestQueue::opPtr_t HttpRequestQueue::fetchOp(bool wait) { - HttpOperation * result(NULL); + HttpOperation::ptr_t result; { HttpScopedLock lock(mQueueMutex); @@ -105,7 +100,7 @@ HttpOperation * HttpRequestQueue::fetchOp(bool wait) while (mQueue.empty()) { if (! wait || mQueueStopped) - return NULL; + return HttpOperation::ptr_t(); mQueueCV.wait(lock); } |