diff options
Diffstat (limited to 'libnm-glib/libnm_glib.c')
| -rw-r--r-- | libnm-glib/libnm_glib.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libnm-glib/libnm_glib.c b/libnm-glib/libnm_glib.c index 5e0e5cf5..911d0cec 100644 --- a/libnm-glib/libnm_glib.c +++ b/libnm-glib/libnm_glib.c @@ -31,7 +31,6 @@ #include "libnm_glib.h" #define DBUS_NO_SERVICE_ERROR "org.freedesktop.DBus.Error.ServiceDoesNotExist" -#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange" struct libnm_glib_ctx @@ -194,18 +193,18 @@ libnm_glib_update_state (libnm_glib_ctx *ctx, g_return_if_fail (ctx != NULL); old_state = ctx->nm_state; - switch (state) - { - case NM_STATE_CONNECTED: + switch (state) { + case NM_STATE_CONNECTED_LOCAL: + case NM_STATE_CONNECTED_SITE: + case NM_STATE_CONNECTED_GLOBAL: ctx->nm_state = LIBNM_ACTIVE_NETWORK_CONNECTION; break; - case NM_STATE_ASLEEP: case NM_STATE_CONNECTING: case NM_STATE_DISCONNECTED: + case NM_STATE_DISCONNECTING: ctx->nm_state = LIBNM_NO_NETWORK_CONNECTION; break; - case NM_STATE_UNKNOWN: default: ctx->nm_state = LIBNM_NO_NETWORKMANAGER; @@ -272,7 +271,7 @@ libnm_glib_dbus_filter (DBusConnection *connection, { libnm_glib_get_nm_state (ctx); } - else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, NM_DBUS_SIGNAL_STATE_CHANGE)) + else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "StateChanged")) { NMState state = NM_STATE_UNKNOWN; |