From: Daniel Wagner <[email protected]>

In case Session.Connect() is called several times while
the selected services is still going from the IDLE state
to ONLINE state (or error state), do not call
select_and_connect() again. This leads to an inconsistent
ref counting on the service.

Fixes BMC#23630
---
 src/session.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/session.c b/src/session.c
index 990caea..384714f 100644
--- a/src/session.c
+++ b/src/session.c
@@ -1038,6 +1038,11 @@ static void session_changed(struct connman_session 
*session,
                        break;
                }
 
+               if (info->entry != NULL &&
+                               is_connecting(info->entry->state) == TRUE) {
+                       break;
+               }
+
                select_and_connect(session,
                                CONNMAN_SESSION_REASON_CONNECT);
 
-- 
1.7.6.4

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

Reply via email to