diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2015-05-21 13:04:58 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2015-05-29 08:38:41 +0200 |
commit | 8bf19c0ec4c138b5fe611fc85745b82ecd67858c (patch) | |
tree | 6e0522f008cf96093bd5fb77cf8e5d8ce50fb952 | |
parent | 5f662b6d56617e571097c9bb53182fc16fc225a0 (diff) | |
download | NetworkManager-8bf19c0ec4c138b5fe611fc85745b82ecd67858c.tar.gz |
libnm-glib: print a bold warning about reaching a D-Bus limit
This causes incorrect application behaviour, so libnm-glib should warn
at least.
(cherry picked from commit 91a5f4ceb928b95a92d43bbd51c3f9f463a4d97b)
-rw-r--r-- | libnm-glib/nm-remote-settings.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libnm-glib/nm-remote-settings.c b/libnm-glib/nm-remote-settings.c index bc3b3334d9..2d1af5240d 100644 --- a/libnm-glib/nm-remote-settings.c +++ b/libnm-glib/nm-remote-settings.c @@ -469,6 +469,7 @@ connection_inited (GObject *source, GAsyncResult *result, gpointer user_data) AddConnectionInfo *addinfo; const char *path; GError *error = NULL, *local; + static gboolean print_once = TRUE; path = nm_connection_get_path (NM_CONNECTION (remote)); addinfo = add_connection_info_find (self, remote); @@ -504,6 +505,14 @@ 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) { + 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>", + __func__, error->message); + print_once = FALSE; + } + g_error_free (error); } |