Source::SearchDetails const& details,
bool error)
{
- if(closeConnection_)
+ /*if(closeConnection_)
{
closeConnection_ = false;
ConnectionManager cm;
cm.disconnect(true);
- }
+ }*/
// If box is not visible, the call must have been terminated already
if(!initialized_ || !box_->isVisible() || !currentCall_)
if(closeConnection_)
{
+ QTimer::singleShot(500, this, SLOT(closeConnection()));
+ }
+}
+
+void CallListener::closeConnection()
+{
+ if(closeConnection_)
+ {
closeConnection_ = false;
ConnectionManager cm;
cm.disconnect(true);
return false;
}
- qDebug() << "Connecting to " << best.name;
+ qDebug() << "Connecting to " << best.name << " (" << best.id << ")";
if(cm.connect(best.id))
{
+ sleep(500);
break;
}
else if(cm.error() == ConnectionManager::INVALID_IAP)
if(retries < CONNECT_RETRIES)
{
- sendRetrySignal(best.id, initialized_);
+ sendRetrySignal(best.id, false);
+ sleep(WAIT_BETWEEN_RETRIES);
}
}
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");