From: Daniel Wagner <[email protected]>

All session should be informed that when there is service state change.

For example, if one session calls Session.Connect() and the other
session is only wants to free ride then it also needs to be informed
(call session_changed).
---
 src/session.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/session.c b/src/session.c
index 8dab52c..a125dd8 100644
--- a/src/session.c
+++ b/src/session.c
@@ -1412,7 +1412,6 @@ static void service_state_changed(struct connman_service 
*service,
        gpointer key, value;
        struct connman_session *session;
        struct session_info *info;
-       connman_bool_t online;
 
        DBG("service %p state %d", service, state);
 
@@ -1423,15 +1422,12 @@ static void service_state_changed(struct 
connman_service *service,
                info = &session->info;
 
                if (info->service == service) {
-                       online = __connman_service_is_connected(service);
-                       if (info->online == online)
-                               continue;
-
-                       info->online = online;
+                       info->online = __connman_service_is_connected(service);
                        session->info_dirty = TRUE;
-                       session_changed(session,
-                                       CONNMAN_SESSION_TRIGGER_SERVICE);
                }
+
+               session_changed(session,
+                               CONNMAN_SESSION_TRIGGER_SERVICE);
        }
 }
 
-- 
1.7.4.4

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to