diff options
author | Dan Winship <danw@gnome.org> | 2014-04-08 12:00:09 -0400 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-03-03 18:54:20 +0100 |
commit | 6265398b6e33ea67d73c592dd3a88f3fafc5bc7a (patch) | |
tree | 62fe364fea6ee0374412baa277b8d41711eb6a8f /libnm-glib | |
parent | 01b9b4104c365002fae5e45b564956062fe146d4 (diff) | |
download | NetworkManager-6265398b6e33ea67d73c592dd3a88f3fafc5bc7a.tar.gz |
all: use g_error_matches()
Use g_error_matches() where we're testing error codes. In particular,
use it rather than looking at only ->code and not also ->domain, which
is just wrong.
[thaller@redhat.com: rebase and modify original patch]
Diffstat (limited to 'libnm-glib')
-rw-r--r-- | libnm-glib/nm-remote-settings.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-glib/nm-remote-settings.c b/libnm-glib/nm-remote-settings.c index fa2b325f05..42d90f6ae2 100644 --- a/libnm-glib/nm-remote-settings.c +++ b/libnm-glib/nm-remote-settings.c @@ -503,7 +503,7 @@ connection_inited (GObject *source, GAsyncResult *result, gpointer user_data) if (!dbus_g_error_has_name (error, "org.freedesktop.NetworkManager.Settings.PermissionDenied")) g_hash_table_remove (priv->pending, path); - if (print_once && error->code == DBUS_GERROR_LIMITS_EXCEEDED) { + if (print_once && g_error_matches (error, DBUS_GERROR, DBUS_GERROR_LIMITS_EXCEEDED)) { g_printerr ("Warning: libnm-glib:%s(): a D-Bus limit exceeded: %s. The application might not work properly.\n" "Consider increasing max_replies_per_connection limit in /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf " "like <limit name=\"max_replies_per_connection\">2048</limit>", |