From 1ceb6d7143a289f4f881405739c9c84ad24ca51d Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 3 Apr 2016 23:30:04 +0200 Subject: [PATCH] LP-277 silence OPMap log output it is just too verbose... --- ground/gcs/src/libs/opmapcontrol/src/core/opmaps.cpp | 7 ++++++- .../gcs/src/libs/opmapcontrol/src/core/tilecachequeue.cpp | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ground/gcs/src/libs/opmapcontrol/src/core/opmaps.cpp b/ground/gcs/src/libs/opmapcontrol/src/core/opmaps.cpp index 3fffd50db..b271ccf7c 100644 --- a/ground/gcs/src/libs/opmapcontrol/src/core/opmaps.cpp +++ b/ground/gcs/src/libs/opmapcontrol/src/core/opmaps.cpp @@ -181,18 +181,23 @@ QByteArray OPMaps::GetImageFrom(const MapType::Types &type, const Point &pos, co default: break; } +#ifdef DEBUG_GMAPS qDebug() << "Timeout is " << Timeout; +#endif // DEBUG_GMAPS reply = network.get(qheader); +#ifdef DEBUG_GMAPS qDebug() << "reply " << reply; +#endif // DEBUG_GMAPS QTime time; while ((!(reply->isFinished()) || (time.elapsed() > (6 * Timeout)))) { QCoreApplication::processEvents(QEventLoop::AllEvents); } +#ifdef DEBUG_GMAPS qDebug() << "Finished?" << reply->error() << " abort?" << (time.elapsed() > Timeout * 6); +#endif // DEBUG_GMAPS // If you are seeing Error 6 here you are dealing with a QT SSL Bug!!! - if ((reply->error() != QNetworkReply::NoError) | (time.elapsed() > Timeout * 6)) { qDebug() << "reply error: " << reply->error() << " see table at - http://doc.qt.io/qt-5/qnetworkreply.html"; return ret; diff --git a/ground/gcs/src/libs/opmapcontrol/src/core/tilecachequeue.cpp b/ground/gcs/src/libs/opmapcontrol/src/core/tilecachequeue.cpp index a47716517..465b59134 100644 --- a/ground/gcs/src/libs/opmapcontrol/src/core/tilecachequeue.cpp +++ b/ground/gcs/src/libs/opmapcontrol/src/core/tilecachequeue.cpp @@ -86,7 +86,9 @@ void TileCacheQueue::run() usleep(44); delete task; } else { +#ifdef DEBUG_TILECACHEQUEUE qDebug() << "Cache engine BEGIN WAIT"; +#endif // DEBUG_TILECACHEQUEUE waitmutex.lock(); int tout = 4000; if (!waitc.wait(&waitmutex, tout)) { @@ -101,7 +103,9 @@ void TileCacheQueue::run() } mutex.unlock(); } +#ifdef DEBUG_TILECACHEQUEUE qDebug() << "Cache Engine DID NOT TimeOut"; +#endif // DEBUG_TILECACHEQUEUE waitmutex.unlock(); } }