diff options
| author | Michael Biebl <biebl@debian.org> | 2010-11-29 19:00:22 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2010-11-29 19:00:22 +0100 |
| commit | a6b89d35fabd9f5934b84d7cde22e9268f92c3d3 (patch) | |
| tree | 9e44755880d5933fcc90c6008d4585a76298a1bd /libnm-glib/nm-remote-settings.c | |
| parent | 9fae01fa351805b2903e535736e06971bc0b925e (diff) | |
Imported Upstream version 0.8.2 upstream/0.8.2
Diffstat (limited to 'libnm-glib/nm-remote-settings.c')
| -rw-r--r-- | libnm-glib/nm-remote-settings.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/libnm-glib/nm-remote-settings.c b/libnm-glib/nm-remote-settings.c index 92814a15..6a9a1d71 100644 --- a/libnm-glib/nm-remote-settings.c +++ b/libnm-glib/nm-remote-settings.c @@ -166,12 +166,26 @@ fetch_connections_done (DBusGProxy *proxy, int i; if (error) { - g_warning ("%s: error fetching %s connections: (%d) %s.", - __func__, - priv->scope == NM_CONNECTION_SCOPE_USER ? "user" : "system", - error->code, - error->message ? error->message : "(unknown)"); + gboolean is_spawn_error = FALSE; + + /* Don't warn if the user settings service wasn't running since that's + * just annoying when running headless. + */ + if ( g_error_matches (error, DBUS_GERROR, DBUS_GERROR_SERVICE_UNKNOWN) + || g_error_matches (error, DBUS_GERROR, DBUS_GERROR_NAME_HAS_NO_OWNER)) + is_spawn_error = TRUE; + + if (!is_spawn_error || priv->scope == NM_CONNECTION_SCOPE_SYSTEM) { + g_warning ("%s: error fetching %s connections: (%d) %s.", + __func__, + priv->scope == NM_CONNECTION_SCOPE_USER ? "user" : "system", + error->code, + error->message ? error->message : "(unknown)"); + } g_clear_error (&error); + + /* We tried to read connections and failed */ + g_signal_emit_by_name (self, NM_SETTINGS_INTERFACE_CONNECTIONS_READ); return; } |