Hi Aaron,

On ti, 2014-07-15 at 10:28 +1000, Aaron McCarthy wrote:
> On Mon, 14 Jul 2014 11:20:39 Jukka Rissanen wrote:
> > On ma, 2014-07-14 at 10:45 +1000, Aaron McCarthy wrote:
> > > The AutoConnect property is always reported as false if Favorite is
> > > false. Emit property changed for AutoConnect when Favorite changes.
> > > ---
> > > 
> > >  src/service.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > > 
> > > diff --git a/src/service.c b/src/service.c
> > > index 9406bc3..899f981 100644
> > > --- a/src/service.c
> > > +++ b/src/service.c
> > > @@ -4885,6 +4885,9 @@ int __connman_service_set_favorite_delayed(struct
> > > connman_service *service,> 
> > >   favorite_changed(service);
> > > 
> > > + if (service->autoconnect)
> > > +         autoconnect_changed(service);
> > > +
> > 
> > There is a problem here. If we set the Favorite to false and if
> > autoconnect is still true, then a signal would be set that tells that
> > service autoconnect is still true. But we will never autoconnect to this
> > service in this case because it is not favorite any more.
> > 
> > What kind of use case you had in mind here?
> > Why is it not enough to follow the favorite flag?
> 
> The problem is that we are displaying the state of the AutoConnect property 
> in 
> the UI. The application is watching for property changes for a particular 
> service. When the Favorite property changes (causing a corresponding change 
> to 
> AutoConnect) the application gets notified of the Favorite property change 
> but 
> not the AutoConnect property change. Explicitly requesting the value of the 
> AutoConnect property returns the expected value.
> 

As a Jolla phone user, I must say that the connectivity UI would need a
complete overhaul. Toggling autoconnect flag in main wlan menu does not
make much sense. This is probably not a proper forum for that discussion
so I do not go there.

> On further investigation the AutoConnect value reported by the DBus 
> GetProperties method and autoconnect_changed() are different when Favorite is 
> false. I've fixed the patch so that the value reported by both are the same.
> 

Cheers,
Jukka


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

Reply via email to