[libvirt-glib] Fix gvir_config_domain_sound_set_model

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's creating an unwanted extra <sound> XML node:
<sound>
  <sound model="xxx">
</sound>
instead of the correct
<sound model="xxx">
---
 libvirt-gconfig/libvirt-gconfig-domain-sound.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/libvirt-gconfig/libvirt-gconfig-domain-sound.c b/libvirt-gconfig/libvirt-gconfig-domain-sound.c
index 0812d06..abf9a14 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-sound.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-sound.c
@@ -72,15 +72,9 @@ GVirConfigDomainSound *gvir_config_domain_sound_new_from_xml(const gchar *xml,
 void gvir_config_domain_sound_set_model(GVirConfigDomainSound *sound,
                                         GVirConfigDomainSoundModel model)
 {
-    GVirConfigObject *node;
-
     g_return_if_fail(GVIR_IS_CONFIG_DOMAIN_SOUND(sound));
-    node = gvir_config_object_replace_child(GVIR_CONFIG_OBJECT(sound),
-                                            "sound");
-    g_return_if_fail(GVIR_IS_CONFIG_OBJECT(node));
-    gvir_config_object_set_attribute_with_type(node, "model",
+    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(sound), "model",
                                                GVIR_TYPE_CONFIG_DOMAIN_SOUND_MODEL,
                                                model,
                                                NULL);
-    g_object_unref(G_OBJECT(node));
 }
-- 
1.7.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]