summaryrefslogtreecommitdiff
path: root/libnm-glib/nm-remote-connection.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2011-02-12 22:00:30 -0600
committerDan Williams <dcbw@redhat.com>2011-02-12 22:00:30 -0600
commitc7ec68e0bad9937f5c932c39465d7b6e98f545ba (patch)
tree6a9c5fdee47e3d38d5b4121b3c91f2c220d22223 /libnm-glib/nm-remote-connection.c
parentd94590a52cd81f8099cac2db7cd1de29418e0080 (diff)
downloadNetworkManager-c7ec68e0bad9937f5c932c39465d7b6e98f545ba.tar.gz
libnm-glib: handle initially invisible connections correctly
Don't delete them if we don't have permission for them, since we may get permission for them later via Update. But to listen for Update we need the connection around.
Diffstat (limited to 'libnm-glib/nm-remote-connection.c')
-rw-r--r--libnm-glib/nm-remote-connection.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c
index cf1cc5418b..09c7112596 100644
--- a/libnm-glib/nm-remote-connection.c
+++ b/libnm-glib/nm-remote-connection.c
@@ -262,7 +262,11 @@ init_get_settings_cb (DBusGProxy *proxy,
if (error) {
/* Connection doesn't exist, or isn't visible to this user */
- priv->init_result = NM_REMOTE_CONNECTION_INIT_RESULT_ERROR;
+ if (dbus_g_error_has_name (error, "org.freedesktop.NetworkManager.Settings.PermissionDenied"))
+ priv->init_result = NM_REMOTE_CONNECTION_INIT_RESULT_INVISIBLE;
+ else
+ priv->init_result = NM_REMOTE_CONNECTION_INIT_RESULT_ERROR;
+
g_object_notify (G_OBJECT (self), NM_REMOTE_CONNECTION_INIT_RESULT);
} else {
priv->visible = TRUE;