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);
+       }
+
        __connman_ipconfig_disable(service->ipconfig);
        __connman_stats_service_unregister(service);
 
-- 
1.7.2.3

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

Reply via email to