]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
test: Activate interfaces specified through driver config file.
authorCole Robinson <crobinso@redhat.com>
Wed, 7 Oct 2009 14:44:05 +0000 (10:44 -0400)
committerCole Robinson <crobinso@redhat.com>
Tue, 13 Oct 2009 14:56:42 +0000 (10:56 -0400)
This matches the behavior of domains, storage, etc. Also, fix up some
whitespace issues in the area.

src/test/test_driver.c

index 0b866d214419706abf1b0f8fa7da1d31036eb733..0541a7348cdb877d68e04cf6e3f9372892f83f96 100644 (file)
@@ -779,13 +779,16 @@ static int testOpenFromFile(virConnectPtr conn,
             if (!def)
                 goto error;
         } else {
-        if ((def = virInterfaceDefParseNode(conn, xml, ifaces[i])) == NULL)
+            if ((def = virInterfaceDefParseNode(conn, xml, ifaces[i])) == NULL)
                 goto error;
         }
+
         if (!(iface = virInterfaceAssignDef(conn, &privconn->ifaces, def))) {
             virInterfaceDefFree(def);
             goto error;
         }
+
+        iface->active = 1;
         virInterfaceObjUnlock(iface);
     }
     VIR_FREE(ifaces);