manager: Fix GVariant format strings for AddAndActivate2 return value

AddAndActivate2 returns an empty a{sv} dictionary for extensibility. The
format strings to create the methods return value were slightly wrong,
causing assertion failures.

Fixes: fbb038af5e

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/73
This commit is contained in:
Benjamin Berg 2019-01-29 13:24:43 +01:00 committed by Thomas Haller
parent 4cc54941cc
commit 5ae4245be2

View file

@ -5312,10 +5312,10 @@ activation_add_done (NMSettings *settings,
nm_dbus_object_get_path (NM_DBUS_OBJECT (new_connection)),
nm_dbus_object_get_path (NM_DBUS_OBJECT (active)));
} else {
result_floating = g_variant_new ("(ooa{sv})",
result_floating = g_variant_new ("(oo@a{sv})",
nm_dbus_object_get_path (NM_DBUS_OBJECT (new_connection)),
nm_dbus_object_get_path (NM_DBUS_OBJECT (active)),
g_variant_new_array (G_VARIANT_TYPE ("a{sv}"), NULL, 0));
g_variant_new_array (G_VARIANT_TYPE ("{sv}"), NULL, 0));
}
g_dbus_method_invocation_return_value (context, result_floating);