On Thu, 2009-07-02 at 17:23 +0800, 代尔欣 wrote: > Hi all, > I add a new wired connection and remove it immediately in > nm-connection-editor. When I click the nm-applet, I found the removed > connection sill there. This problem is not always happen. But it > indeed happen... > > I use 0.7.0 released codes. Further debug, I found:
Yeah, this was most likely fixed in 0.7.1 with the following commit: commit f9142e838c764fbe70a5ec9f18894bbb78e0dbe4 Author: Tambet Ingo <[email protected]> Date: Fri Jan 16 19:40:12 2009 +0000 src/gconf-helpers/nma-gconf-settings.c - (connection_changes_done, 2008-01-16 Tambet Ingo <[email protected]> * src/gconf-helpers/nma-gconf-settings.c - (connection_changes_done, add_connection_real, connection_removed): fix handling of connections removed from GConf by external programs (bgo #557590) svn path=/trunk/; revision=1095 Dan > nma-gconf-settings.c , I add some comment below, please check: > > static gboolean > connection_changes_done (gpointer data) > { > ConnectionChangedInfo *info = (ConnectionChangedInfo *) data; > NMAGConfSettingsPrivate *priv = NMA_GCONF_SETTINGS_GET_PRIVATE > (info->settings); > NMAGConfConnection *connection; > > connection = nma_gconf_settings_get_by_path (info->settings, > info->path); > if (!connection) { > /* New connection */ > connection = nma_gconf_connection_new (priv->client, > info->path); > if (connection) { > g_signal_connect (connection, "new-secrets-requested", > G_CALLBACK > (connection_new_secrets_requested_cb), > info->settings); > priv->connections = g_slist_append (priv->connections, > connection); > nm_settings_signal_new_connection (NM_SETTINGS > (info->settings), > NM_EXPORTED_CONNECTION > (connection)); > } > } else { > if (gconf_client_dir_exists (priv->client, info->path, NULL)) > { > > /* > ------------------------------------------------------------------------------ > When the issue occur, the codes can't run here.... So > the connection list > priv->connections can't be updated. It seems reasonable > because the related gconf > dir is already deleted. > > ------------------------------------------------------------------------------ > */ > > /* Updated connection */ > if (!nma_gconf_connection_changed (connection)) > { > priv->connections = g_slist_remove (priv->connections, > connection); > } > } > /* > ------------------------------------------------------------------------------ > Below is my added codes to fix the issue. From my test, it > seems ok. > > ------------------------------------------------------------------------------ > */ > else { > /* If here, the info->path do not exist? delete the > connection */ > if (!nma_gconf_connection_changed (connection)) > { > priv->connections = g_slist_remove (priv->connections, > connection); > } > } > /* ----------------------Fix codes > end-------------------------------------*/ > } > > g_hash_table_remove (priv->pending_changes, info->path); > > return FALSE; > } > > Any idea about this issue? gconf bug? or gconf-help bug? > _______________________________________________ > NetworkManager-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/networkmanager-list _______________________________________________ NetworkManager-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/networkmanager-list
