@fix: Disconnect Reason code was not getting reset 23/154323/2
authorManeesh Jain <maneesh.jain@samsung.com>
Tue, 10 Oct 2017 05:08:24 +0000 (10:38 +0530)
committerManeesh Jain <maneesh.jain@samsung.com>
Tue, 10 Oct 2017 05:18:14 +0000 (05:18 +0000)
Description: In following use case, disconnect reason code was not getting reset.
1. Connect With AP
2. Change the Password of AP
3. Check the Disconnect Reason using CAPI
4. Connect again with AP with New Password
5. Check the Disconnect Reason again : It was showing 3 in place of 0.

Change-Id: I1b1542b69ac270811ad789a4f662836241b6bf34
Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
src/service.c

index 24a7b00..0c9c897 100755 (executable)
@@ -5255,6 +5255,9 @@ static DBusMessage *connect_service(DBusConnection *conn,
         */
        if (service->type == CONNMAN_SERVICE_TYPE_CELLULAR)
                connman_service_user_pdn_connection_ref(service);
+
+       /*Reset the Disconnect Reason while issue connect request*/
+       service->disconnect_reason = 0;
 #endif
 
        if (service->pending)