summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2016-06-15 20:13:09 +0530
committerNiraj Kumar Goit <niraj.g@samsung.com>2016-06-17 03:33:30 -0700
commit6e3436df89f8293c60ef750a6e442f1203f56d40 (patch)
treee9e19f6567b81ce68400ca0221ee69295db903f7 /plugins
parent5858fc542fa6bd5766e6caee92e1a437656ce8de (diff)
downloadconnman-6e3436df89f8293c60ef750a6e442f1203f56d40.tar.gz
connman-6e3436df89f8293c60ef750a6e442f1203f56d40.tar.bz2
connman-6e3436df89f8293c60ef750a6e442f1203f56d40.zip
[SPIN] Added the connman disconnect reason property.
Change-Id: I11fd7baa7d00fa3f3a12bdafda7ff7aa6943d020 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/wifi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index f8642ad0..632e138e 100755
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2674,11 +2674,14 @@ static void interface_state(GSupplicantInterface *interface)
#if defined TIZEN_EXT
int err;
+ int reason_code = 0;
err = g_supplicant_interface_remove_network(wifi->interface);
if (err < 0)
DBG("Failed to remove network(%d)", err);
+ reason_code = g_supplicant_interface_get_disconnect_reason(wifi->interface);
+
/* Some of Wi-Fi networks are not comply Wi-Fi specification.
* Retry association until its retry count is expired */
if (handle_wifi_assoc_retry(network, wifi) == true) {
@@ -2687,6 +2690,11 @@ static void interface_state(GSupplicantInterface *interface)
break;
}
+ if(reason_code > 0){
+ DBG("Set disconnect reason code(%d)", reason_code);
+ connman_network_set_disconnect_reason(network, reason_code);
+ }
+
/* To avoid unnecessary repeated association in wpa_supplicant,
* "RemoveNetwork" should be made when Wi-Fi is disconnected */
if (wps != true && wifi->network && wifi->disconnecting == false) {