summary refs log tree commit diff
path: root/libnm-glib/nm-remote-settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-glib/nm-remote-settings.c')
-rw-r--r--libnm-glib/nm-remote-settings.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libnm-glib/nm-remote-settings.c b/libnm-glib/nm-remote-settings.c
index d5f4ca67..80a274f5 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);
@@ -492,7 +493,7 @@ connection_inited (GObject *source, GAsyncResult *result, gpointer user_data)
 			local = g_error_new (NM_REMOTE_SETTINGS_ERROR,
 			                     NM_REMOTE_SETTINGS_ERROR_CONNECTION_UNAVAILABLE,
 			                     "Connection not visible or not available: %s",
-			                     error ? error->message : "(unknown)");
+			                     error->message);
 			add_connection_info_complete (self, addinfo, local);
 			g_error_free (local);
 		}
@@ -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);
 	}