diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c index f65171f97e..535706d82d 100644 --- a/libnm-core/nm-setting.c +++ b/libnm-core/nm-setting.c @@ -744,12 +744,6 @@ _nm_setting_to_dbus (NMSetting *setting, NMConnection *connection, NMConnectionS destroy_gvalue (value); } - /* Don't return empty hashes, except for base types */ - if (g_hash_table_size (hash) < 1 && !_nm_setting_is_base_type (setting)) { - g_hash_table_destroy (hash); - hash = NULL; - } - return hash; } diff --git a/libnm-core/tests/test-secrets.c b/libnm-core/tests/test-secrets.c index 221fc76028..22aa460ebc 100644 --- a/libnm-core/tests/test-secrets.c +++ b/libnm-core/tests/test-secrets.c @@ -678,7 +678,7 @@ test_update_secrets_whole_connection_empty_base_setting (void) connection = wifi_connection_new (); secrets = nm_connection_to_dbus (connection, NM_CONNECTION_SERIALIZE_ONLY_SECRETS); - g_assert_cmpint (g_hash_table_size (secrets), ==, 1); + g_assert_cmpint (g_hash_table_size (secrets), ==, 3); g_assert (g_hash_table_lookup (secrets, NM_SETTING_WIRELESS_SETTING_NAME)); success = nm_connection_update_secrets (connection,