From 5c39fc14d2f945bda9b4aa5cefd4054b42f372c2 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Thu, 11 Aug 2011 16:56:18 +0200 Subject: [PATCH] session: Service changed cleanup --- src/session.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/session.c b/src/session.c index 7d9fc8b..0adc44b 100644 --- a/src/session.c +++ b/src/session.c @@ -906,6 +906,15 @@ static void session_changed(struct connman_session *session, break; } + /* + * We are not online, we are not connecting, that + * means we could still have a valid info->entry. + * Though something has changed from the service layer. + * Therefore we want to restart the algorithm. Before we + * can do that we have to cleanup a potientional old entry. + */ + explicit_disconnect(session); + if (info->reason == CONNMAN_SESSION_REASON_CONNECT) { DBG("Retry to find a matching session"); /* -- 2.7.4