From d11b7bc611d355ea4152402dc0c8c14f40212b6b Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 4 Jan 2011 18:24:10 -0600 Subject: [PATCH] wimax: do nothing if state isn't actually changing --- src/wimax/nm-device-wimax.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wimax/nm-device-wimax.c b/src/wimax/nm-device-wimax.c index ed3120315d..14336ea5c2 100644 --- a/src/wimax/nm-device-wimax.c +++ b/src/wimax/nm-device-wimax.c @@ -618,6 +618,9 @@ wmx_state_change_cb (struct wmxsdk *wmxsdk, gboolean old_available = FALSE; const char *nsp_name = NULL; + if (new_status == old_status) + return; + iface = nm_device_get_iface (NM_DEVICE (self)); state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self)); old_available = nm_device_is_available (NM_DEVICE (self)); @@ -848,9 +851,10 @@ static gboolean sdk_action_defer_cb (gpointer user_data) { NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data); + gboolean old_available = nm_device_is_available (NM_DEVICE (self)); NM_DEVICE_WIMAX_GET_PRIVATE (self)->sdk_action_defer_id = 0; - update_availability (self, FALSE); + update_availability (self, old_available); return FALSE; }