[connman] AutoConnect to old service when connection to new service fails 47/98447/1
authorSaurav Babu <saurav.babu@samsung.com>
Thu, 17 Nov 2016 09:53:28 +0000 (15:23 +0530)
committerSaurav Babu <saurav.babu@samsung.com>
Thu, 17 Nov 2016 09:53:28 +0000 (15:23 +0530)
In the following scenario:
1. Device is connected to AP1.
2. Connection requested initiated with AP2.

AP1 gets disconnected and device initiates connection with AP2. If
connection with AP2 fails(like invalid key, dhcp-failed error) then
device should auto connect to AP1.
This patch initiates auto connect to last connected AP's

Change-Id: Iad5c4cf50da7a91869994abc133b24d66c99b0bc
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
src/service.c

index 1eae380..1a9478b 100755 (executable)
@@ -6563,6 +6563,7 @@ static int service_indicate_state(struct connman_service *service)
 #if defined TIZEN_EXT
                if (service->type == CONNMAN_SERVICE_TYPE_WIFI)
                        service->order = 5;
+               __connman_service_auto_connect(CONNMAN_SERVICE_CONNECT_REASON_AUTO);
 #endif
                if (service->connect_reason == CONNMAN_SERVICE_CONNECT_REASON_USER &&
                        connman_agent_report_error(service, service->path,