Chengyi,

Your approach may only work for the most basic use case.  If you plan to
use the session policy plugin this approach will not work because it looks
up the uid/gid/seLinux information when the session is created.  If the
connman created the session for you, you'd be unable the gather this
information and specific stats tracking (enabled by the use of the session
policy plugin) would be impossible to setup/gather with the current
implementation.

Tysen


On Tue, Nov 12, 2013 at 5:15 AM, Chengyi Zhao <[email protected]>wrote:

> Hi Dianel,
>
> Thanks for your reply.
>
>
> 2013/11/11 Daniel Wagner <[email protected]>
>
> > On 11/10/2013 10:47 AM, Chengyi Zhao wrote:
> >
> >> 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,
> >>
> >
> > SessionAutoConnectMode is a configuration flag which doesn't change
> during
> > runtime. It changes the way AutoConnect is interpreted. I don't follow
> > you here: why should a new Service be created when a Session should also
> > be created? Could you please elaborate?
>
>
> By default, I think the application does not need to create session, so
> connman should automatically manager
> the session.
> In other words, even if the application does not use a session, also
> able to use
> the default network policy.
>
>
>
> >
> >  and when service is connected session should be connected,
> >>
> >
> > Yes, that is what is happening now...
> >
> >
> >  of course, and
> >> when service is disconnected
> >> session should be disconnected.
> >>
> >
> > and this as well. The Service.Connect()/Disconnect() overrule all
> > Session.Connect()/Disconnect() actions. What SessionAutoConnectMode
> > changes is when the user didn't say Service.Connect() or Disconnect()
> > then ConnMan will not connect to any Service unless there is
> > a Session asking for a connection -> no session == no connection.
> > Currently ConnMan will still try to stay connected due AutoConnect set
> > to true.
> >  Hope that helps,
> >
> >
> Thanks a lot,  very helpful to me.
>
> 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