diff options
author | Rider Linden <rider@lindenlab.com> | 2015-10-16 11:40:48 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-10-16 11:40:48 -0700 |
commit | 8d334ca1bf51dc1a0020f53cdd7a3927bdb7740c (patch) | |
tree | b5624a2a6f94c5e6e1c748fc1c4ae3e77ceda5d2 /indra/llcorehttp/_httprequestqueue.cpp | |
parent | 302e5780694a6f271807d0804db0c6fc6923026f (diff) |
MAINT-5271: Converted internal pointers to internal operation to managed shared pointers. Removed direct cast and dereference of handles.
Diffstat (limited to 'indra/llcorehttp/_httprequestqueue.cpp')
-rwxr-xr-x | 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 100755 --- 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); } |