You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-overlay/profiles/patches/net-misc/networkmanager-0.8.2-discar...

35 lines
1.2 KiB

From 1187922adf7f781cb257b5e119d53a403e3d4831 Mon Sep 17 00:00:00 2001
From: Dan Williams <dcbw@redhat.com>
Date: Fri, 14 Jan 2011 20:02:02 +0000
Subject: core: lack of an IPv4 setting indicates DHCP (novell #664640)
It shouldn't assert.
---
diff --git a/src/nm-device.c b/src/nm-device.c
index b9701a3..fa586ef 100644
--- a/src/nm-device.c
+++ b/src/nm-device.c
@@ -3355,7 +3355,7 @@ dispose (GObject *object)
if ( nm_device_interface_can_assume_connections (NM_DEVICE_INTERFACE (self))
&& (nm_device_get_state (self) == NM_DEVICE_STATE_ACTIVATED)) {
NMConnection *connection;
- NMSettingIP4Config *s_ip4;
+ NMSettingIP4Config *s_ip4 = NULL;
const char *method = NULL;
/* Only system connections can be left up */
@@ -3368,9 +3368,8 @@ dispose (GObject *object)
* to check that.
*/
s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
- g_assert (s_ip4);
-
- method = nm_setting_ip4_config_get_method (s_ip4);
+ if (s_ip4)
+ method = nm_setting_ip4_config_get_method (s_ip4);
if ( !method
|| !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)
|| !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL))
--
cgit v0.8.3-6-g21f6