Moving stuff around a bit...
This commit is contained in:
@@ -1324,8 +1324,12 @@ CurlMultiHandle::~CurlMultiHandle()
|
|||||||
{
|
{
|
||||||
curl_multi_cleanup(mMultiHandle);
|
curl_multi_cleanup(mMultiHandle);
|
||||||
Stats::multi_calls++;
|
Stats::multi_calls++;
|
||||||
|
#ifdef CWDEBUG
|
||||||
|
int total = --sTotalMultiHandles;
|
||||||
|
Dout(dc::curl, "Called CurlMultiHandle::~CurlMultiHandle() [" << (void*)this << "], " << total << " remaining.");
|
||||||
|
#else
|
||||||
--sTotalMultiHandles;
|
--sTotalMultiHandles;
|
||||||
Dout(dc::curl, "Called CurlMultiHandle::~CurlMultiHandle() [" << (void*)this << "], " << sTotalMultiHandles << " remaining.");
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AICurlPrivate
|
} // namespace AICurlPrivate
|
||||||
|
|||||||
@@ -233,11 +233,12 @@ typedef AIAccess<AICurlPrivate::CurlEasyRequest> AICurlEasyRequest_wat;
|
|||||||
|
|
||||||
// Events generated by AICurlPrivate::CurlEasyHandle.
|
// Events generated by AICurlPrivate::CurlEasyHandle.
|
||||||
struct AICurlEasyHandleEvents {
|
struct AICurlEasyHandleEvents {
|
||||||
virtual ~AICurlEasyHandleEvents(){}
|
|
||||||
// Events.
|
// Events.
|
||||||
virtual void added_to_multi_handle(AICurlEasyRequest_wat& curl_easy_request_w) = 0;
|
virtual void added_to_multi_handle(AICurlEasyRequest_wat& curl_easy_request_w) = 0;
|
||||||
virtual void finished(AICurlEasyRequest_wat& curl_easy_request_w) = 0;
|
virtual void finished(AICurlEasyRequest_wat& curl_easy_request_w) = 0;
|
||||||
virtual void removed_from_multi_handle(AICurlEasyRequest_wat& curl_easy_request_w) = 0;
|
virtual void removed_from_multi_handle(AICurlEasyRequest_wat& curl_easy_request_w) = 0;
|
||||||
|
// Avoid compiler warning.
|
||||||
|
virtual ~AICurlEasyHandleEvents() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "aicurlprivate.h"
|
#include "aicurlprivate.h"
|
||||||
|
|||||||
@@ -248,8 +248,8 @@ void PollSet::remove(curl_socket_t s)
|
|||||||
// mFdSet.fd_array instead of mFileDescriptors and mIter instead of mNext.
|
// mFdSet.fd_array instead of mFileDescriptors and mIter instead of mNext.
|
||||||
if (FD_ISSET(s, &mFdSet))
|
if (FD_ISSET(s, &mFdSet))
|
||||||
{
|
{
|
||||||
int i = --mFdSet.fd_count;
|
llassert(mFdSet.fd_count > 0);
|
||||||
llassert(i >= 0);
|
unsigned int i = --mFdSet.fd_count;
|
||||||
curl_socket_t cur = mFdSet.fd_array[i];
|
curl_socket_t cur = mFdSet.fd_array[i];
|
||||||
while (cur != s)
|
while (cur != s)
|
||||||
{
|
{
|
||||||
@@ -258,7 +258,7 @@ void PollSet::remove(curl_socket_t s)
|
|||||||
mFileDescriptors[i] = cur;
|
mFileDescriptors[i] = cur;
|
||||||
cur = next;
|
cur = next;
|
||||||
}
|
}
|
||||||
if (mIter > (unsigned int)i)
|
if (mIter > i)
|
||||||
--mIter;
|
--mIter;
|
||||||
llassert(mIter <= mFdSet.fd_count);
|
llassert(mIter <= mFdSet.fd_count);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user