mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +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>
|
Thu Feb 5 18:08:39 GMT 2009 John Levon <john.levon@sun.com>
|
||||||
|
|
||||||
* src/xs_internal.c: Use virMacAddrCompare() for
|
* src/xs_internal.c: Use virMacAddrCompare() for
|
||||||
|
@ -2424,8 +2424,7 @@ catchXMLError (void *ctx, const char *msg ATTRIBUTE_UNUSED, ...)
|
|||||||
if (ctxt) {
|
if (ctxt) {
|
||||||
virConnectPtr conn = ctxt->_private;
|
virConnectPtr conn = ctxt->_private;
|
||||||
|
|
||||||
if (conn &&
|
if (virGetLastError() == NULL &&
|
||||||
conn->err.code == VIR_ERR_NONE &&
|
|
||||||
ctxt->lastError.level == XML_ERR_FATAL &&
|
ctxt->lastError.level == XML_ERR_FATAL &&
|
||||||
ctxt->lastError.message != NULL) {
|
ctxt->lastError.message != NULL) {
|
||||||
virDomainReportError (conn, VIR_ERR_XML_DETAIL,
|
virDomainReportError (conn, VIR_ERR_XML_DETAIL,
|
||||||
@ -2458,7 +2457,7 @@ virDomainDefPtr virDomainDefParseString(virConnectPtr conn,
|
|||||||
XML_PARSE_NOENT | XML_PARSE_NONET |
|
XML_PARSE_NOENT | XML_PARSE_NONET |
|
||||||
XML_PARSE_NOWARNING);
|
XML_PARSE_NOWARNING);
|
||||||
if (!xml) {
|
if (!xml) {
|
||||||
if (conn && conn->err.code == VIR_ERR_NONE)
|
if (virGetLastError() == NULL)
|
||||||
virDomainReportError(conn, VIR_ERR_XML_ERROR,
|
virDomainReportError(conn, VIR_ERR_XML_ERROR,
|
||||||
"%s", _("failed to parse xml document"));
|
"%s", _("failed to parse xml document"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -2499,7 +2498,7 @@ virDomainDefPtr virDomainDefParseFile(virConnectPtr conn,
|
|||||||
XML_PARSE_NOENT | XML_PARSE_NONET |
|
XML_PARSE_NOENT | XML_PARSE_NONET |
|
||||||
XML_PARSE_NOWARNING);
|
XML_PARSE_NOWARNING);
|
||||||
if (!xml) {
|
if (!xml) {
|
||||||
if (conn && conn->err.code == VIR_ERR_NONE)
|
if (virGetLastError() == NULL)
|
||||||
virDomainReportError(conn, VIR_ERR_XML_ERROR,
|
virDomainReportError(conn, VIR_ERR_XML_ERROR,
|
||||||
"%s", _("failed to parse xml document"));
|
"%s", _("failed to parse xml document"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
Reference in New Issue
Block a user