httpconnectionhandlerpool.cpp   httpconnectionhandlerpool.cpp 
skipping to change at line 15 skipping to change at line 15
#include <QSslConfiguration> #include <QSslConfiguration>
#endif #endif
#include <QDir> #include <QDir>
#include "httpconnectionhandlerpool.h" #include "httpconnectionhandlerpool.h"
HttpConnectionHandlerPool::HttpConnectionHandlerPool(const HttpConnectionHa ndlerPoolSettings &settings, HttpRequestHandler* requestHandler) HttpConnectionHandlerPool::HttpConnectionHandlerPool(const HttpConnectionHa ndlerPoolSettings &settings, HttpRequestHandler* requestHandler)
: QObject() : QObject()
{ {
this->settings=settings; this->settings=settings;
this->requestHandler=requestHandler; this->requestHandler=requestHandler;
this->sslConfiguration=NULL; this->sslConfiguration=Q_NULLPTR;
loadSslConfig(); loadSslConfig();
cleanupTimer.start(settings.cleanupInterval); cleanupTimer.start(settings.cleanupInterval);
connect(&cleanupTimer, SIGNAL(timeout()), SLOT(cleanup())); connect(&cleanupTimer, SIGNAL(timeout()), SLOT(cleanup()));
} }
HttpConnectionHandlerPool::~HttpConnectionHandlerPool() HttpConnectionHandlerPool::~HttpConnectionHandlerPool()
{ {
// delete all connection handlers and wait until their threads are clos ed // delete all connection handlers and wait until their threads are clos ed
foreach(HttpConnectionHandler* handler, pool) foreach(HttpConnectionHandler* handler, pool)
{ {
delete handler; delete handler;
} }
delete sslConfiguration; delete sslConfiguration;
qDebug("HttpConnectionHandlerPool (%p): destroyed", this); qDebug("HttpConnectionHandlerPool (%p): destroyed", this);
} }
HttpConnectionHandler* HttpConnectionHandlerPool::getConnectionHandler() HttpConnectionHandler* HttpConnectionHandlerPool::getConnectionHandler()
{ {
HttpConnectionHandler* freeHandler=0; HttpConnectionHandler* freeHandler=Q_NULLPTR;
mutex.lock(); mutex.lock();
// find a free handler in pool // find a free handler in pool
foreach(HttpConnectionHandler* handler, pool) foreach(HttpConnectionHandler* handler, pool)
{ {
if (!handler->isBusy()) if (!handler->isBusy())
{ {
freeHandler=handler; freeHandler=handler;
freeHandler->setBusy(); freeHandler->setBusy();
break; break;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/