-
Lubomir Rintel authored
Utilize _nm_setting_to_dbus() to serialize the setting. The main reason is that this way we can also print the more complicated values g_strdup_value_contents() can't grok, e.g. the GArrays and GHashTables. Some effort was spent on tidying up the results in a manner it was done previously, instead of reducing this to a plain g_variant_print(). It looks good that way: Before: vpn service-type : "org.freedesktop.NetworkManager.VPN.Novpn" (s) user-name : NULL (sd) persistent : FALSE (sd) data : ((GHashTable*) 0xc61060) (s) secrets : ((GHashTable*) 0xdda640) (s) timeout : 0 (sd) After: vpn service-type : 'org.freedesktop.NetworkManager.VPN.Novpn' data : {'gateway': 'novpn.example.com', 'username': 'hello'} secrets : {'password': 'world'} Note that no effort was spent on printing the defaults. There are multiple ways that could be achieved, but I'm not sure it would be all that necessary given this is really just a quick'n'dirty debugging facilty.
f957ea2b