unsigned int marker;
struct service_entry *entry;
+ enum connman_session_reason reason;
};
struct connman_session {
entry = info->entry;
info->online = FALSE;
+ info->reason = CONNMAN_SESSION_REASON_UNKNOWN;
info->entry = NULL;
if (disconnect == TRUE) {
DBG("session %p reason %s", session, reason2string(reason));
+ info->reason = reason;
+
iter = g_sequence_get_begin_iter(session->service_list);
while (g_sequence_iter_is_end(iter) == FALSE) {
break;
}
+ if (info->reason == CONNMAN_SESSION_REASON_CONNECT) {
+ DBG("Retry to find a matching session");
+ /*
+ * The user called Connect() but there was no
+ * matching session available at this point.
+ * Now there might be a new one. Let's retry
+ * to select and connect
+ */
+ select_and_connect(session,
+ CONNMAN_SESSION_REASON_CONNECT);
+
+ break;
+ }
+
if (info->stay_connected == TRUE) {
DBG("StayConnected");
select_and_connect(session,