Hi Aaron,

On to, 2014-07-17 at 16:42 +1000, Aaron McCarthy wrote:
> On Tue, 15 Jul 2014 11:42:12 Jukka Rissanen wrote:
> > On ti, 2014-07-15 at 10:29 +1000, Aaron McCarthy wrote:
> > > The AutoConnect property is always reported as false if Favorite is
> > > false. Emit property changed for AutoConnect when Favorite changes.
> > > When emitting the changed signal use the same logic as GetProperties in
> > > determining the value to return for AutoConnect.
> > 
> > If favorite changes to false (meaning that service is then removed and
> > not connectable any longer), then sending autoconnect value does not
> > make much sense as favorite==false implies that already.
> 
> By not sending the autoconnect value the application needs to be coded to 
> handle this implied relationship between favorite and autoconnect. By sending 
> the signal the application can trust that the notified value of autoconnect 
> is 
> correct.
> 
> In our implementation GetProperties is hardly ever called. It may be called 
> once at construction time to get the initial state if it hasn't already been 
> initialise from the service list retrieved from the manager object. 
> Afterwards 
> property are kept up to date in response to property changed notifications 
> from DBus.
> 
> > If favorite changes to true (meaning that user connected to it
> > successfully again), then this kind of patch has some merit because it
> > might be good to know the value of autoconnect without a call to
> > GetProperties.
> > 
> > I wonder would it make more sense to call autoconnect_changed() in
> > service_indicate_state() when calling
> > __connman_service_set_favorite(service, true), instead of tweaking the
> > set favorite function.
> > The favorite flag is also called from config.c but at that point the
> > service is not yet connected and the autoconnect flag would anyway be
> > sent from service_indicate_state() when the service enters it.
> > 
> > So at the moment I am inclined to say nak to this patch as it is now.
> 
> Cheers,
> 

I think we need to leave this to Patrik to decide if he wants to take
this or not. I have no strong opinion against the patch anyway.


Cheers,
Jukka


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

Reply via email to