From: Daniel Wagner Date: Thu, 11 Aug 2011 14:56:18 +0000 (+0200) Subject: session: Service changed cleanup X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~1248 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c39fc14d2f945bda9b4aa5cefd4054b42f372c2;p=profile%2Fivi%2Fconnman.git session: Service changed cleanup --- 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"); /*