]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Do not ignore mandatory features in migration cookie
authorJiri Denemark <jdenemar@redhat.com>
Wed, 20 Feb 2013 09:30:38 +0000 (10:30 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 20 Feb 2013 14:24:01 +0000 (15:24 +0100)
Due to "feature"/"features" nasty typo, any features marked as mandatory
by one side of a migration are silently considered optional by the other
side. The following is the code that formats mandatory features in
migration cookie:

    for (i = 0 ; i < QEMU_MIGRATION_COOKIE_FLAG_LAST ; i++) {
        if (mig->flagsMandatory & (1 << i))
            virBufferAsprintf(buf, "  <feature name='%s'/>\n",
                              qemuMigrationCookieFlagTypeToString(i));
    }

src/qemu/qemu_migration.c

index 36e55d2e28ee3ba37d2c55807b5b02bb21ac0197..2f7935828295d932a82db43e1ca47394ab25ad93 100644 (file)
@@ -817,7 +817,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
 
     /* Check to ensure all mandatory features from XML are also
      * present in 'flags' */
-    if ((n = virXPathNodeSet("./features", ctxt, &nodes)) < 0)
+    if ((n = virXPathNodeSet("./feature", ctxt, &nodes)) < 0)
         goto error;
 
     for (i = 0 ; i < n ; i++) {