From: eshe Date: Tue, 17 Aug 2010 14:01:43 +0000 (+0100) Subject: One more fix to connection handling. X-Git-Url: http://git.maemo.org/git/?p=jenirok;a=commitdiff_plain;h=d97cbb873b74e7a9a9ecf3363a14d8a33a251cdc One more fix to connection handling. --- diff --git a/src/common/cache.cpp b/src/common/cache.cpp index 2e01f07..5f9a165 100644 --- a/src/common/cache.cpp +++ b/src/common/cache.cpp @@ -108,9 +108,12 @@ bool Cache::addItem(Source::Result const& result) query.bindValue(":street", result.street); query.bindValue(":city", result.city); + qDebug() << result.number << result.name << result.street << result.city; + if(!query.exec()) { + qDebug() << "Unable to add item to cache"; ret = false; } diff --git a/src/common/eniro.cpp b/src/common/eniro.cpp index 77290e2..46fda30 100644 --- a/src/common/eniro.cpp +++ b/src/common/eniro.cpp @@ -257,7 +257,6 @@ void Eniro::handleHttpError(int id) pendingLoginRequests_.end()) { emit loginStatus(false); - } } diff --git a/src/common/source.cpp b/src/common/source.cpp index ac246ab..5d1315e 100644 --- a/src/common/source.cpp +++ b/src/common/source.cpp @@ -181,7 +181,6 @@ void Source::setError(Source::Error error, QString const& errorString) void Source::httpReady(int id, bool error) { - if(error) { if(http_.error() == QHttp::Aborted) diff --git a/src/daemon/calllistener.cpp b/src/daemon/calllistener.cpp index 0938fb8..e73bf26 100644 --- a/src/daemon/calllistener.cpp +++ b/src/daemon/calllistener.cpp @@ -164,6 +164,8 @@ void CallListener::requestFinished(QVector const& results, cm.disconnect(true); }*/ + qDebug() << "Request finished"; + // If box is not visible, the call must have been terminated already if(!initialized_ || !box_->isVisible() || !currentCall_) { @@ -426,6 +428,7 @@ bool CallListener::handleConnection() if(cm.isConnected()) { + cm.connect(); closeConnection_ = false; return true; } diff --git a/src/daemon/calllistener.h b/src/daemon/calllistener.h index 0fba1c7..16b6218 100644 --- a/src/daemon/calllistener.h +++ b/src/daemon/calllistener.h @@ -36,7 +36,7 @@ public: ~CallListener(); bool begin(); void end(); - static const int REQUEST_TIMEOUT = 10000; + static const int REQUEST_TIMEOUT = 8000; static const int BANNER_DELAY = 350; static const int SEARCH_RETRIES = 2; static const int CONNECT_RETRIES = 1;