diff options
author | Dan Williams <dcbw@redhat.com> | 2010-11-23 22:17:21 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-11-23 22:18:51 -0600 |
commit | 83e02840b5ce1cf8c122cc70918ddd57396c91db (patch) | |
tree | d31ed9721d5bfc04eb34747af11ecae89fefaf7e | |
parent | 14617f6916124d29f65e380a3602746841203a57 (diff) |
core: suppress error message when user settings service is not active
Don't bother trying to initialize the user settings proxy when it
isn't even active. Would trigger a warning to syslog if PolicyKit
permissions changed via changes to /usr/share/polkit-1/actions/.
-rw-r--r-- | src/nm-manager.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c index 48f2173d87..afcc6add54 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -1356,6 +1356,12 @@ user_proxy_init (NMManager *self) g_return_if_fail (self != NULL); g_return_if_fail (priv->user_proxy == NULL); + /* Don't try to initialize the user settings proxy if the user + * settings service doesn't actually exist. + */ + if (!nm_dbus_manager_name_has_owner (priv->dbus_mgr, NM_DBUS_SERVICE_USER_SETTINGS)) + return; + bus = nm_dbus_manager_get_connection (priv->dbus_mgr); priv->user_proxy = dbus_g_proxy_new_for_name_owner (bus, NM_DBUS_SERVICE_USER_SETTINGS, @@ -3975,8 +3981,7 @@ nm_manager_start (NMManager *self) * they will be queried when the user settings service shows up on the * bus in nm_manager_name_owner_changed(). */ - if (nm_dbus_manager_name_has_owner (priv->dbus_mgr, NM_DBUS_SERVICE_USER_SETTINGS)) - user_proxy_init (self); + user_proxy_init (self); nm_udev_manager_query_devices (priv->udev_mgr); bluez_manager_resync_devices (self); |