[PATCH 7/7] session: Let autoconnect handle service connecting
wagi at monom.org
Fri Nov 2 04:51:13 PDT 2012
On 02.11.2012 12:18, Patrik Flykt wrote:
> On Fri, 2012-11-02 at 11:06 +0100, Daniel Wagner wrote:
>> With this removal (which should remove the comple function btw)
> Yep, I just had to stop at the minimum so that the patch set would be
> readable. As part II there is quite a lot more that can be removed.
>> you will
>> break the unit tests. When setting SessionMode to TRUE via D-Bus the
>> caller will get the result after the all service are disconnected.
>> is is necessary pre conditions for the unit test.
> Right, I have seem to forget that autoconnect is disabled when
> SessionMode is enabled. Need to fix that.
The SessionMode flag has been introduced to workaround the service
autoconnect. IIRC, we haven't yet figured out out how the service state
machine has to work with sessions without SessionMode.
One thing which could work to consider the Service API
Connect()/Disconnect() has special version of a session. Something like
a default session.
> If I remember correctly, we speculated what the purpose of a SessionMode
> really is. Sessions must be notified also when SessionMode is set to
> FALSE, and that part is working today.
Yes, Tomasz has fixed this.
> The purpose of this patch set was to integrate the connection logic into
> the autoconnect core. This in order to resolve the dilemma of
> contradicting default route setups and service connection between
> multiple sessions.
Yeah, I considered the Session API kind of separate in the beginning but
I understand now that this is not desirable. If you have a good plain to
fix this, go ahead :)
> The point of all this is that sessions should not locally optimize what
> service is used, instead it should be handled on a ConnMan wide scale.
That means you want to move the whole selection/deselection code from
session.c and move it over to service.c?
More information about the connman