projects
/
jenirok
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
99cc542
)
One more fix to connection handling.
author
eshe
<jessehakanen@gmail.com>
Tue, 17 Aug 2010 14:01:43 +0000
(15:01 +0100)
committer
eshe
<jessehakanen@gmail.com>
Tue, 17 Aug 2010 14:01:43 +0000
(15:01 +0100)
src/common/cache.cpp
patch
|
blob
|
history
src/common/eniro.cpp
patch
|
blob
|
history
src/common/source.cpp
patch
|
blob
|
history
src/daemon/calllistener.cpp
patch
|
blob
|
history
src/daemon/calllistener.h
patch
|
blob
|
history
diff --git
a/src/common/cache.cpp
b/src/common/cache.cpp
index
2e01f07
..
5f9a165
100644
(file)
--- 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);
query.bindValue(":street", result.street);
query.bindValue(":city", result.city);
+ qDebug() << result.number << result.name << result.street << result.city;
+
if(!query.exec())
{
if(!query.exec())
{
+ qDebug() << "Unable to add item to cache";
ret = false;
}
ret = false;
}
diff --git
a/src/common/eniro.cpp
b/src/common/eniro.cpp
index
77290e2
..
46fda30
100644
(file)
--- a/
src/common/eniro.cpp
+++ b/
src/common/eniro.cpp
@@
-257,7
+257,6
@@
void Eniro::handleHttpError(int id)
pendingLoginRequests_.end())
{
emit loginStatus(false);
pendingLoginRequests_.end())
{
emit loginStatus(false);
-
}
}
}
}
diff --git
a/src/common/source.cpp
b/src/common/source.cpp
index
ac246ab
..
5d1315e
100644
(file)
--- 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)
{
void Source::httpReady(int id, bool error)
{
-
if(error)
{
if(http_.error() == QHttp::Aborted)
if(error)
{
if(http_.error() == QHttp::Aborted)
diff --git
a/src/daemon/calllistener.cpp
b/src/daemon/calllistener.cpp
index
0938fb8
..
e73bf26
100644
(file)
--- a/
src/daemon/calllistener.cpp
+++ b/
src/daemon/calllistener.cpp
@@
-164,6
+164,8
@@
void CallListener::requestFinished(QVector <Source::Result> const& results,
cm.disconnect(true);
}*/
cm.disconnect(true);
}*/
+ qDebug() << "Request finished";
+
// If box is not visible, the call must have been terminated already
if(!initialized_ || !box_->isVisible() || !currentCall_)
{
// 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())
{
if(cm.isConnected())
{
+ cm.connect();
closeConnection_ = false;
return true;
}
closeConnection_ = false;
return true;
}
diff --git
a/src/daemon/calllistener.h
b/src/daemon/calllistener.h
index
0fba1c7
..
16b6218
100644
(file)
--- a/
src/daemon/calllistener.h
+++ b/
src/daemon/calllistener.h
@@
-36,7
+36,7
@@
public:
~CallListener();
bool begin();
void end();
~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;
static const int BANNER_DELAY = 350;
static const int SEARCH_RETRIES = 2;
static const int CONNECT_RETRIES = 1;