about summary refs log tree commit diff
path: root/libnm-glib/libnm_glib.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-glib/libnm_glib.c')
-rw-r--r--libnm-glib/libnm_glib.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libnm-glib/libnm_glib.c b/libnm-glib/libnm_glib.c
index 911d0cec..5e0e5cf5 100644
--- a/libnm-glib/libnm_glib.c
+++ b/libnm-glib/libnm_glib.c
@@ -31,6 +31,7 @@
 #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
@@ -193,18 +194,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_LOCAL:
-		case NM_STATE_CONNECTED_SITE:
-		case NM_STATE_CONNECTED_GLOBAL:
+	switch (state)
+	{
+		case NM_STATE_CONNECTED:
 			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;
@@ -271,7 +272,7 @@ libnm_glib_dbus_filter (DBusConnection *connection,
 	{
 		libnm_glib_get_nm_state (ctx);
 	}
-	else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "StateChanged"))
+	else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, NM_DBUS_SIGNAL_STATE_CHANGE))
 	{
 		NMState	state = NM_STATE_UNKNOWN;