Timer, time out, and clean up improvements.

This commit is contained in:
Aleric Inglewood
2012-07-11 19:25:29 +02:00
parent 0419f8bee9
commit 7416d2aaf1
13 changed files with 254 additions and 78 deletions

View File

@@ -479,12 +479,17 @@ void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code)
size_t LLXMLRPCTransaction::Impl::curlDownloadCallback(
char* data, size_t size, size_t nmemb, void* user_data)
{
DoutEntering(dc::curl, "LLXMLRPCTransaction::Impl::curlDownloadCallback(\"" << buf2str(data, size * nmemb) << "\", " << size << ", " << nmemb << ", " << user_data << ")");
Impl& impl(*(Impl*)user_data);
size_t n = size * nmemb;
#ifdef CWDEBUG
if (n < 80)
Dout(dc::curl, "Entering LLXMLRPCTransaction::Impl::curlDownloadCallback(\"" << buf2str(data, n) << "\", " << size << ", " << nmemb << ", " << user_data << ")");
else
Dout(dc::curl, "Entering LLXMLRPCTransaction::Impl::curlDownloadCallback(\"" << buf2str(data, 40) << "\"...\"" << buf2str(data + n - 40, 40) << "\", " << size << ", " << nmemb << ", " << user_data << ")");
#endif
impl.mResponseText.append(data, n);
if (impl.mStatus == LLXMLRPCTransaction::StatusStarted)