From 9e743475b6794e61d2c8a652d416d0b812f859fd Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 15 Feb 2021 09:11:42 +0100 Subject: [PATCH] libnm: avoid assertion failure in _dbus_handle_properties_changed() for logging no properties (cherry picked from commit 1f9622358a691aa97b72b3df118feac7970769c4) --- libnm/nm-client.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libnm/nm-client.c b/libnm/nm-client.c index 2c7751965..ec79b40ef 100644 --- a/libnm/nm-client.c +++ b/libnm/nm-client.c @@ -2930,11 +2930,15 @@ _dbus_handle_properties_changed(NMClient * self, gs_free char *ss = NULL; NML_NMCLIENT_LOG_T(self, - "[%s]: %s: properties changed for interface %s { %s }", + "[%s]: %s: properties changed for interface %s %s%s%s", object_path, log_context, interface_name, - (ss = g_variant_print(changed_properties, TRUE))); + NM_PRINT_FMT_QUOTED(changed_properties, + "{ ", + (ss = g_variant_print(changed_properties, TRUE)), + " }", + "(no changed properties)")); } if (inout_dbobj) {