From 7896d4552d719fb186fe113d1ade86d0ae33cdd9 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 12 Mar 2008 17:08:59 +0000 Subject: [PATCH] 2008-03-12 Dan Williams * src/nm-device.c - (nm_device_set_ip4_config): don't send property notifications when the ip4 config is set to NULL; it causes a PropertyChanged signal which dbus-glib can't parse because the value is NULL, which isn't a legal object path. Setting the IP4 config to NULL is only valid when deactivating a device anyway, so the device state change will alert listeners that the ip4 config is invalid. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3431 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 10 ++++++++++ src/nm-device.c | 5 +---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a235f91f0..2ce89e6fa1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-03-12 Dan Williams + + * src/nm-device.c + - (nm_device_set_ip4_config): don't send property notifications when + the ip4 config is set to NULL; it causes a PropertyChanged signal + which dbus-glib can't parse because the value is NULL, which isn't + a legal object path. Setting the IP4 config to NULL is only + valid when deactivating a device anyway, so the device state change + will alert listeners that the ip4 config is invalid. + 2008-03-12 Dan Williams * src/nm-properties-changed-signal.c diff --git a/src/nm-device.c b/src/nm-device.c index 1b72f93a97..a1b2a5464c 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -1385,11 +1385,8 @@ nm_device_set_ip4_config (NMDevice *self, NMIP4Config *config) priv->ip4_config = NULL; } - if (!config) { - if (nm_device_get_state (self) == NM_DEVICE_STATE_ACTIVATED) - g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_IP4_CONFIG); + if (!config) return TRUE; - } priv->ip4_config = g_object_ref (config);