Hi Samuel

> On Wed, Dec 08, 2010 at 04:37:17PM -0800, Mohamed Abbas wrote:
> > Call onnman_device_set_disconnected in connect_timeout if
> > service failed to connect to allow for auto connect from scan
> > to work.
> > ---
> >  src/service.c |    8 +++++++-
> >  1 files changed, 7 insertions(+), 1 deletions(-)
> > 
> > diff --git a/src/service.c b/src/service.c
> > index f417a80..fcb1141 100644
> > --- a/src/service.c
> > +++ b/src/service.c
> > @@ -2206,15 +2206,21 @@ static void reply_pending(struct connman_service 
> > *service, int error)
> >  static gboolean connect_timeout(gpointer user_data)
> >  {
> >     struct connman_service *service = user_data;
> > +   struct connman_device *device;
> >     connman_bool_t autoconnect = FALSE;
> >  
> >     DBG("service %p", service);
> >  
> >     service->timeout = 0;
> >  
> > -   if (service->network != NULL)
> > +   if (service->network != NULL) {
> >             __connman_network_disconnect(service->network);
> >  
> > +           device = connman_network_get_device(service->network);
> > +           if (device != NULL)
> > +                   connman_device_set_disconnected(device, FALSE);
> Don't you want connman_device_set_disconnected(device, TRUE); instead ?
> 
Not really it is already set to TRUE this will cause not calling
auto_connect on scan finish, We set this true to make sure we dont
call auto_connect during we switch to a new network but if we timeout
because the network gone, we need to set to FALSE so we can auto
_connect on next scan.

Mohamed


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

Reply via email to