ypbind/ypbind-mt-1.32-dbus.patch
Honza Horák ae695eaefd Removed NM_DBUS_VPN_SIGNAL_STATE_CHANGE, use own constant
NM_DBUS_SIGNAL_STATE_CHANGED.
(rhbz#696629)
2011-04-29 15:32:52 +02:00

51 lines
1.7 KiB
Diff

diff -up ypbind-mt-1.32/src/ypbind_dbus_nm.c.dbus ypbind-mt-1.32/src/ypbind_dbus_nm.c
--- ypbind-mt-1.32/src/ypbind_dbus_nm.c.dbus 2010-07-07 14:27:26.000000000 +0200
+++ ypbind-mt-1.32/src/ypbind_dbus_nm.c 2011-04-29 14:38:23.565951109 +0200
@@ -32,6 +32,9 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <dbus/dbus-glib.h>
+/* We have our own constant, NM uses directly "StateChanged" string */
+#define NM_DBUS_SIGNAL_STATE_CHANGED "StateChanged"
+
#ifdef HAVE_NETWORKMANAGER_NETWORKMANAGER_H
#include <NetworkManager/NetworkManager.h>
#include <NetworkManager/NetworkManagerVPN.h>
@@ -39,16 +42,21 @@
#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager"
#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager"
#define NM_DBUS_PATH "/org/freedesktop/NetworkManager"
-#define NM_DBUS_VPN_SIGNAL_STATE_CHANGE "StateChange"
typedef enum NMState {
- NM_STATE_UNKNOWN = 0,
- NM_STATE_ASLEEP,
- NM_STATE_CONNECTING,
- NM_STATE_CONNECTED,
- NM_STATE_DISCONNECTED
+ NM_STATE_UNKNOWN = 0,
+ NM_STATE_ASLEEP = 10,
+ NM_STATE_DISCONNECTED = 20,
+ NM_STATE_DISCONNECTING = 30,
+ NM_STATE_CONNECTING = 40,
+ NM_STATE_CONNECTED_LOCAL = 50,
+ NM_STATE_CONNECTED_SITE = 60,
+ NM_STATE_CONNECTED_GLOBAL = 70
} NMState;
+/* For backwards compat */
+#define NM_STATE_CONNECTED NM_STATE_CONNECTED_GLOBAL
+
#endif
#define DBUS_MESSAGE_MATCH \
@@ -150,7 +158,7 @@ dbus_filter (DBusConnection *connection,
handled = DBUS_HANDLER_RESULT_HANDLED;
}
else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE,
- NM_DBUS_VPN_SIGNAL_STATE_CHANGE))
+ NM_DBUS_SIGNAL_STATE_CHANGED))
{
NMState state = NM_STATE_UNKNOWN;