Hi,

On Fri, 2013-12-13 at 09:34 +0100, Daniel Wagner wrote:
>  
> -static int active_sessions[MAX_CONNMAN_SERVICE_TYPES] = {};
> -static int active_count = 0;
> -
> -void __connman_service_set_active_session(bool enable, GSList *list)
> -{
> -     if (!list)
> -             return;
> -
> -     if (enable)
> -             active_count++;
> -     else
> -             active_count--;

When active_count > 0 at least one session has issued a connect() in the
current code.

> -                     if (!active_count)
> +                     if (!__connman_session_running())

These two don't seem to be the same thing...

> +bool __connman_session_running(void)
> +{
> +     return g_hash_table_size(session_hash) > 0;
> +}

...as connman_session_running() returns true if there are any sessions
in session_hash regardless of their state, no?

Cheers,

        Patrik

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

Reply via email to