Fixes to connection handling in daemon.
[jenirok] / src / common / connectionmanager.cpp
index e8d9ad4..fb0f395 100644 (file)
@@ -192,13 +192,6 @@ bool ConnectionManager::disconnect(bool force)
 {
     if(force)
     {
-        // Do not allow forced disconnection if connection was not started
-        // by this class.
-        if(!connected_)
-        {
-            return false;
-        }
-
         QDBusMessage msg = QDBusMessage::createSignal("/com/nokia/icd_ui",
                                                       "com.nokia.icd_ui",
                                                       "disconnect");
@@ -406,7 +399,7 @@ void ConnectionManager::scanResult(const QDBusMessage& rep)
         {
             if(status == ICD_SCAN_NEW)
             {
-                connections_->insert(i, connection);
+                connections_->replace(i, connection);
             }
 
             return;