From 0b94b3d318189eadd654a58f3946f7e688104514 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 10 Sep 2007 18:31:56 +0000 Subject: [PATCH] 2007-09-10 Dan Williams * src/nm-manager.c - (query_connections): fix uninitialized variable problem that caused segfault - (nm_manager_add_device): take devices down on startup so that we can be assured that nm_device_is_up() won't short-circuit the init process. Hack until the is_up check gets split into two pieces that aren't behaviorally confusing. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2777 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 10 ++++++++++ src/nm-manager.c | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a85d27c717..3bbdab5dca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-09-10 Dan Williams + + * src/nm-manager.c + - (query_connections): fix uninitialized variable problem that caused + segfault + - (nm_manager_add_device): take devices down on startup so that we can + be assured that nm_device_is_up() won't short-circuit the init + process. Hack until the is_up check gets split into two pieces + that aren't behaviorally confusing. + 2007-09-09 Dan Williams * introspection/nm-device.xml diff --git a/src/nm-manager.c b/src/nm-manager.c index ebc5893939..fa4de2b208 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -424,6 +424,7 @@ query_connections (NMManager *manager, g_return_if_fail (NM_IS_MANAGER (manager)); + priv = NM_MANAGER_GET_PRIVATE (manager); if (type == NM_CONNECTION_TYPE_USER) { proxy = &priv->user_proxy; service = NM_DBUS_SERVICE_USER_SETTINGS; @@ -435,7 +436,6 @@ query_connections (NMManager *manager, return; } - priv = NM_MANAGER_GET_PRIVATE (manager); if (!*proxy) { NMDBusManager * dbus_mgr; DBusGConnection * g_connection; @@ -654,8 +654,10 @@ nm_manager_add_device (NMManager *manager, NMDevice *device) manager); if (!priv->sleeping) { - if (!NM_IS_DEVICE_802_11_WIRELESS (device) || priv->wireless_enabled) + if (!NM_IS_DEVICE_802_11_WIRELESS (device) || priv->wireless_enabled) { + nm_device_bring_down (device, TRUE); nm_device_bring_up (device, TRUE); + } } nm_device_interface_deactivate (NM_DEVICE_INTERFACE (device));