mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
src/domain_conf.c: Check the last error, not the last
connection error, which may not have been set.
This commit is contained in:
parent
003f354917
commit
31135bff29
@ -1,3 +1,8 @@
|
||||
Thu Feb 5 19:28:10 GMT 2009 John Levon <john.levon@sun.com>
|
||||
|
||||
* src/domain_conf.c: Check the last error, not the last
|
||||
connection error, which may not have been set.
|
||||
|
||||
Thu Feb 5 18:08:39 GMT 2009 John Levon <john.levon@sun.com>
|
||||
|
||||
* src/xs_internal.c: Use virMacAddrCompare() for
|
||||
|
@ -2424,8 +2424,7 @@ catchXMLError (void *ctx, const char *msg ATTRIBUTE_UNUSED, ...)
|
||||
if (ctxt) {
|
||||
virConnectPtr conn = ctxt->_private;
|
||||
|
||||
if (conn &&
|
||||
conn->err.code == VIR_ERR_NONE &&
|
||||
if (virGetLastError() == NULL &&
|
||||
ctxt->lastError.level == XML_ERR_FATAL &&
|
||||
ctxt->lastError.message != NULL) {
|
||||
virDomainReportError (conn, VIR_ERR_XML_DETAIL,
|
||||
@ -2458,7 +2457,7 @@ virDomainDefPtr virDomainDefParseString(virConnectPtr conn,
|
||||
XML_PARSE_NOENT | XML_PARSE_NONET |
|
||||
XML_PARSE_NOWARNING);
|
||||
if (!xml) {
|
||||
if (conn && conn->err.code == VIR_ERR_NONE)
|
||||
if (virGetLastError() == NULL)
|
||||
virDomainReportError(conn, VIR_ERR_XML_ERROR,
|
||||
"%s", _("failed to parse xml document"));
|
||||
goto cleanup;
|
||||
@ -2499,7 +2498,7 @@ virDomainDefPtr virDomainDefParseFile(virConnectPtr conn,
|
||||
XML_PARSE_NOENT | XML_PARSE_NONET |
|
||||
XML_PARSE_NOWARNING);
|
||||
if (!xml) {
|
||||
if (conn && conn->err.code == VIR_ERR_NONE)
|
||||
if (virGetLastError() == NULL)
|
||||
virDomainReportError(conn, VIR_ERR_XML_ERROR,
|
||||
"%s", _("failed to parse xml document"));
|
||||
goto cleanup;
|
||||
|
Loading…
Reference in New Issue
Block a user