Re: removed connection still can be seen
- From: neXus <nexus aflb com>
- To: 代尔欣 <daierxin gmail com>
- Cc: networkmanager-list <networkmanager-list gnome org>
- Subject: Re: removed connection still can be seen
- Date: Thu, 02 Jul 2009 13:58:07 +0200
Got same issue under sled11 ! Add or remove connection via nm editor
not always refreshed in nm-applet. Maybe a signal not caught ?
Le 2 juil. 2009 à 11:23, 代尔欣 <daierxin gmail com> a écrit :
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:
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
NetworkManager-list gnome org
http://mail.gnome.org/mailman/listinfo/networkmanager-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]