Hi Daniel,

2013/11/8 Daniel Wagner <[email protected]>

> From: Daniel Wagner <[email protected]>
>
> When SessionAutoConnectMode is enabled we should also make sure
> we disconnect unused Services. Unused means there is no
> Session is using a Service (__connman_session_in_use()) and
> asking for a connection (__connman_session_wants_connection())
>

IMHO, if SessionAutoConnectMode is enabled, when service is created session
should  be created,
and when service is connected session should be connected, of course, and
when service is disconnected
session should be disconnected.


> Note if the user did a Service.Connect() (service->userconnect)
> we won't disconnect the Service.
>
> The algorithm could potentially be merged into auto_connect_service()
> but this function is already complex enough let's have a
> auto_disconnect_service() which runs after auto_connect_service(). The
> upside is that we don't change the current play with auto connect
> as it seems to work correctly.
> ---
>  src/connman.h |  2 ++
>  src/service.c | 38 ++++++++++++++++++++++++++++++++++++++
>  src/session.c | 40 ++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 80 insertions(+)
>
>
Cheers,

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

Reply via email to