projects
/
jenirok
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some fixes to connection manager.
[jenirok]
/
src
/
daemon
/
calllistener.cpp
diff --git
a/src/daemon/calllistener.cpp
b/src/daemon/calllistener.cpp
index
b4d80d4
..
c76cfdc
100644
(file)
--- a/
src/daemon/calllistener.cpp
+++ b/
src/daemon/calllistener.cpp
@@
-111,8
+111,6
@@
void CallListener::end()
void CallListener::search(Source::SearchDetails const& details)
{
void CallListener::search(Source::SearchDetails const& details)
{
- qDebug() << "Search called";
-
if(currentCall_)
{
delete currentCall_;
if(currentCall_)
{
delete currentCall_;
@@
-150,8
+148,6
@@
void CallListener::search(Source::SearchDetails const& details)
showDelayedResult(tr("Searching..."), BANNER_DELAY);
showDelayedResult(tr("Searching..."), BANNER_DELAY);
- qDebug() << "Starting to search...";
-
source_->search(details);
}
source_->search(details);
}
@@
-161,12
+157,14
@@
void CallListener::requestFinished(QVector <Source::Result> const& results,
Source::SearchDetails const& details,
bool error)
{
Source::SearchDetails const& details,
bool error)
{
- if(closeConnection_)
+ /*if(closeConnection_)
{
closeConnection_ = false;
ConnectionManager cm;
cm.disconnect(true);
{
closeConnection_ = false;
ConnectionManager cm;
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_)
@@
-405,6
+403,14
@@
void CallListener::searchClose()
if(closeConnection_)
{
if(closeConnection_)
{
+ QTimer::singleShot(500, this, SLOT(closeConnection()));
+ }
+}
+
+void CallListener::closeConnection()
+{
+ if(closeConnection_)
+ {
closeConnection_ = false;
ConnectionManager cm;
cm.disconnect(true);
closeConnection_ = false;
ConnectionManager cm;
cm.disconnect(true);
@@
-422,6
+428,7
@@
bool CallListener::handleConnection()
if(cm.isConnected())
{
if(cm.isConnected())
{
+ cm.connect();
closeConnection_ = false;
return true;
}
closeConnection_ = false;
return true;
}
@@
-515,7
+522,7
@@
bool CallListener::handleConnection()
return false;
}
return false;
}
- qDebug() << "Connecting to " << best.name;
+ qDebug() << "Connecting to " << best.name << " (" << best.id << ")";
if(cm.connect(best.id))
{
if(cm.connect(best.id))
{
@@
-533,7
+540,8
@@
bool CallListener::handleConnection()
if(retries < CONNECT_RETRIES)
{
if(retries < CONNECT_RETRIES)
{
- sendRetrySignal(best.id, initialized_);
+ sendRetrySignal(best.id, false);
+ sleep(WAIT_BETWEEN_RETRIES);
}
}
}
}
@@
-601,7
+609,7
@@
bool CallListener::is3g()
void CallListener::sendRetrySignal(QString const& iap, bool retry)
{
void CallListener::sendRetrySignal(QString const& iap, bool retry)
{
- QDBusMessage msg = QDBusMessage::createSignal("/com/nokia/icd_ui",
+ QDBusMessage msg = QDBusMessage::createSignal("/com/nokia/icd_ui",
"com.nokia.icd_ui",
"retry");
"com.nokia.icd_ui",
"retry");