mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
Activate virtual networks initialized in custom test driver.
If specifying a custom test driver, virtual networks were not 'activated' on driver init. This differs from the behavior of domains and storage pools, so fix it. Also improve a couple error messages in that area.
This commit is contained in:
parent
f7f52b1592
commit
5de555cae2
@ -1,3 +1,7 @@
|
||||
Mon Jun 22 12:38:19 EDT 2009 Cole Robinson <crobinso@redhat.com>
|
||||
|
||||
* src/test.c: Activate virtual networks initialized in custom test driver.
|
||||
|
||||
Mon Jun 22 12:35:34 EDT 2009 Cole Robinson <crobinso@redhat.com>
|
||||
|
||||
* src/util.c: Fix segfault if storage pool has no type attribute
|
||||
|
@ -381,7 +381,8 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
if (!(xml = xmlReadFd(fd, file, NULL,
|
||||
XML_PARSE_NOENT | XML_PARSE_NONET |
|
||||
XML_PARSE_NOERROR | XML_PARSE_NOWARNING))) {
|
||||
testError(NULL, VIR_ERR_INTERNAL_ERROR, "%s", _("host"));
|
||||
testError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
_("Invalid XML in file '%s'"), file);
|
||||
goto error;
|
||||
}
|
||||
close(fd);
|
||||
@ -389,7 +390,8 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
|
||||
root = xmlDocGetRootElement(xml);
|
||||
if ((root == NULL) || (!xmlStrEqual(root->name, BAD_CAST "node"))) {
|
||||
testError(NULL, VIR_ERR_XML_ERROR, "%s", _("node"));
|
||||
testError(NULL, VIR_ERR_XML_ERROR, "%s",
|
||||
_("Root element is not 'node'"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -541,6 +543,7 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
goto error;
|
||||
}
|
||||
net->persistent = 1;
|
||||
net->active = 1;
|
||||
virNetworkObjUnlock(net);
|
||||
}
|
||||
VIR_FREE(networks);
|
||||
|
Loading…
x
Reference in New Issue
Block a user