Hi,

2013/12/13 Daniel Wagner <[email protected]>

> From: Daniel Wagner <[email protected]>
>
> Since session.c maintains a map between Services and Sessions
> there is little point in having service.c. doing the same
> thing. The auto connect algorithm is just interested if
> there is a session active and if a given Service type
> matches a Session configuration.
>
> Therefore let's add two functions for service.c which allows
> service.c to ask session.c if there is any session and if
> there is a session which is active for given service.
> ---
>  src/connman.h |   4 ++-
>  src/service.c |  58 ++++----------------------------
>  src/session.c | 104
> +++++++++++++++++++++++++++++++++++++++++++++-------------
>  3 files changed, 92 insertions(+), 74 deletions(-)
>
>
> @@ -1053,11 +1093,12 @@ static void trigger_disconnect(struct
> connman_session *session)
>         if (!info->connect)
>                 return;
>
> -       __connman_service_set_active_session(false,
> -                               info->config.allowed_bearers);
> +       session_set_active(session, false);
>
>         info->connect = false;
>         info->state = CONNMAN_SESSION_STATE_DISCONNECTED;
> +
> +       __connman_service_auto_connect();
>

Here session has known which service(session->service) it will connect.
I think we can modify "__connman_service_auto_connect()", and add a
parameter:
__connman_service_auto_connect(struct connman_service *service);


Cheers,
Chengyi


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

Reply via email to