diff options
Diffstat (limited to 'gsupplicant/supplicant.c')
-rwxr-xr-x | gsupplicant/supplicant.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 6fb9c7b4..89591fee 100755 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -181,6 +181,9 @@ struct _GSupplicantInterface { GHashTable *bss_mapping; void *data; const char *pending_peer_path; +#if defined TIZEN_EXT + int disconnect_reason; +#endif }; struct g_supplicant_bss { @@ -2280,6 +2283,17 @@ static void interface_property(const char *key, DBusMessageIter *iter, } else if (g_strcmp0(key, "Networks") == 0) { supplicant_dbus_array_foreach(iter, interface_network_added, interface); +#if defined TIZEN_EXT + } else if (g_strcmp0(key, "DisconnectReason") == 0) { + int disconnect_reason = 0; + + dbus_message_iter_get_basic(iter, &disconnect_reason); + interface->disconnect_reason = disconnect_reason; + + SUPPLICANT_DBG("disconnect reason (%d)", + interface->disconnect_reason); + +#endif } else SUPPLICANT_DBG("key %s type %c", key, dbus_message_iter_get_arg_type(iter)); @@ -5651,6 +5665,23 @@ int g_supplicant_interface_remove_network(GSupplicantInterface *interface) return network_remove(data); } + +int g_supplicant_interface_get_disconnect_reason(GSupplicantInterface *interface) +{ + int reason_code = 0; + + SUPPLICANT_DBG(""); + + if (interface == NULL) + return -EINVAL; + + if (system_available == FALSE) + return -EFAULT; + + reason_code = interface->disconnect_reason; + + return reason_code; +} #endif static const char *g_supplicant_rule0 = "type=signal," |