From a73d3132dfab5533803ddf75ffea1b2a18b2382e Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 23 Dec 2008 16:50:46 +0000 Subject: [PATCH] - Removed some useless debug - Increased httpserver update interval --- src/GUI.cpp | 2 +- src/httprequestparser.cpp | 9 ++++----- src/httpserver.cpp | 4 +--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/GUI.cpp b/src/GUI.cpp index 739c7fd2f..9763bb4ae 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -1535,7 +1535,7 @@ bool GUI::initWebUi(QString username, QString password, int port) httpServer->close(); } else - httpServer = new HttpServer(BTSession, 2000, this); + httpServer = new HttpServer(BTSession, 3000, this); httpServer->setAuthorization(username, password); bool success = httpServer->listen(QHostAddress::Any, port); if (success) diff --git a/src/httprequestparser.cpp b/src/httprequestparser.cpp index d2c04f591..1fa8f93db 100644 --- a/src/httprequestparser.cpp +++ b/src/httprequestparser.cpp @@ -92,13 +92,13 @@ void HttpRequestParser::write(QByteArray str) data.clear(); QUrl url = QUrl::fromEncoded(QHttpRequestHeader::path().toAscii()); path = url.path(); - qDebug() << path; + //() << path; QListIterator > i(url.queryItems()); while (i.hasNext()) { QPair pair = i.next(); getMap[pair.first] = pair.second; - qDebug() << pair.first << "=" << get(pair.first); + //qDebug() << pair.first << "=" << get(pair.first); } } } @@ -122,7 +122,7 @@ void HttpRequestParser::write(QByteArray str) { QPair pair = i.next(); postMap[pair.first] = pair.second; - qDebug() << pair.first << "=" << post(pair.first); + //qDebug() << pair.first << "=" << post(pair.first); } } if(contentType() == "multipart/form-data") @@ -134,6 +134,5 @@ void HttpRequestParser::write(QByteArray str) } else error = true; - } - qDebug() << "isError: " << isError(); + } } diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 26586a13c..4e68fbe94 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -76,7 +76,6 @@ void HttpServer::newHttpConnection() void HttpServer::onTimer() { - qDebug("EventManager Timer Start"); QStringList list = BTSession->getUnfinishedTorrents(); foreach(QString hash, list) { QTorrentHandle h = BTSession->getTorrentHandle(hash); @@ -86,8 +85,7 @@ void HttpServer::onTimer() foreach(QString hash, list) { QTorrentHandle h = BTSession->getTorrentHandle(hash); if(h.is_valid()) manager->modifiedTorrent(h); - } - qDebug("EventManager Timer Stop"); + } } void HttpServer::setAuthorization(QString username, QString password)