diff --git a/ChangeLog b/ChangeLog index be1aa14634..27be104323 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-10-10 Dan Williams + + * src/nm-manager.c + - (wait_for_connection_expired): ensure info is valid + - (connection_added_default_handler): Should only remove pending + connection info when the manager has the connection that it's + waiting for. Fixes segfault in wait_for_connection_info(). + 2007-10-10 Dan Williams * libnm-util/nm-setting.c diff --git a/src/nm-manager.c b/src/nm-manager.c index f2e0016131..7f7fede333 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -1105,6 +1105,8 @@ wait_for_connection_expired (gpointer data) PendingConnectionInfo *info = priv->pending_connection_info; GError *err; + g_return_val_if_fail (info != NULL, FALSE); + nm_info ("%s: didn't receive connection details soon enough for activation.", nm_device_get_iface (info->device)); @@ -1158,15 +1160,12 @@ connection_added_default_handler (NMManager *manager, NMConnectionType connection_type) { NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager); - PendingConnectionInfo *info; + PendingConnectionInfo *info = priv->pending_connection_info; const char *path; - if (!nm_manager_activation_pending (manager)) + if (!info) return; - info = priv->pending_connection_info; - priv->pending_connection_info = NULL; - if (connection_type != info->connection_type) return; @@ -1174,6 +1173,9 @@ connection_added_default_handler (NMManager *manager, if (strcmp (info->connection_path, path)) return; + /* Will destroy below; can't be valid during the initial activation start */ + priv->pending_connection_info = NULL; + // FIXME: remove old_dev deactivation when multiple device support lands deactivate_old_device (manager);