From c3d3a3d16a9da1e31caa88b7023381daf576a68b Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 11 May 2012 17:15:40 -0500 Subject: [PATCH] supplicant: handle interface state 'disabled' Been around for a while; happens if the interface goes away or is rfkilled. Recognize it for now but we don't do anything with it yet. --- src/supplicant-manager/nm-supplicant-interface.c | 6 +++++- src/supplicant-manager/nm-supplicant-interface.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c index 3460a928b1..f83a13c348 100644 --- a/src/supplicant-manager/nm-supplicant-interface.c +++ b/src/supplicant-manager/nm-supplicant-interface.c @@ -369,7 +369,9 @@ wpas_iface_bss_removed (DBusGProxy *proxy, static int wpas_state_string_to_enum (const char *str_state) { - if (!strcmp (str_state, "disconnected")) + if (!strcmp (str_state, "interface_disabled")) + return NM_SUPPLICANT_INTERFACE_STATE_DISABLED; + else if (!strcmp (str_state, "disconnected")) return NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED; else if (!strcmp (str_state, "inactive")) return NM_SUPPLICANT_INTERFACE_STATE_INACTIVE; @@ -1290,6 +1292,8 @@ nm_supplicant_interface_state_to_string (guint32 state) return "starting"; case NM_SUPPLICANT_INTERFACE_STATE_READY: return "ready"; + case NM_SUPPLICANT_INTERFACE_STATE_DISABLED: + return "disabled"; case NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED: return "disconnected"; case NM_SUPPLICANT_INTERFACE_STATE_INACTIVE: diff --git a/src/supplicant-manager/nm-supplicant-interface.h b/src/supplicant-manager/nm-supplicant-interface.h index c417e9b42b..77abec0758 100644 --- a/src/supplicant-manager/nm-supplicant-interface.h +++ b/src/supplicant-manager/nm-supplicant-interface.h @@ -34,6 +34,7 @@ enum { NM_SUPPLICANT_INTERFACE_STATE_INIT = 0, NM_SUPPLICANT_INTERFACE_STATE_STARTING, NM_SUPPLICANT_INTERFACE_STATE_READY, + NM_SUPPLICANT_INTERFACE_STATE_DISABLED, NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED, NM_SUPPLICANT_INTERFACE_STATE_INACTIVE, NM_SUPPLICANT_INTERFACE_STATE_SCANNING,