session: Don't reset session if serivce was not selected
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Mon, 22 Aug 2011 11:16:04 +0000 (13:16 +0200)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 23 Aug 2011 15:22:29 +0000 (17:22 +0200)
src/session.c

index 3d26546..d23b1b1 100644 (file)
@@ -1626,7 +1626,8 @@ static void service_remove(struct connman_service *service)
 
                g_sequence_remove(iter);
 
-               info->entry = NULL;
+               if (info->entry != NULL && info->entry->service == service)
+                       info->entry = NULL;
                session_changed(session, CONNMAN_SESSION_TRIGGER_SERVICE);
        }
 }