From: Humaid <syedhumaidbinharoon(a)gmail.com>
Converted few instances of virSaveLastError() to virErrorPreserveLast() as per the newer
internal APIs for saving and restoring error reports.
Signed-off-by: Syed Humaid <syedhumaidbinharoon(a)gmail.com>
---
src/libvirt-domain.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index be5b1f6740..fba4d98994 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -2894,7 +2894,7 @@ virDomainMigrateVersion2(virDomainPtr domain,
_("domainMigratePrepare2 did not set uri"));
cancelled = 1;
/* Make sure Finish doesn't overwrite the error */
- orig_err = virSaveLastError();
+ virErrorPreserveLast(&orig_err);
goto finish;
}
if (uri_out)
@@ -2909,7 +2909,7 @@ virDomainMigrateVersion2(virDomainPtr domain,
/* Perform failed. Make sure Finish doesn't overwrite the error */
if (ret < 0)
- orig_err = virSaveLastError();
+ virErrorPreserveLast(&orig_err);
/* If Perform returns < 0, then we need to cancel the VM
* startup on the destination
@@ -3100,7 +3100,7 @@ virDomainMigrateVersion3Full(virDomainPtr domain,
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("domainMigratePrepare3 did not set uri"));
cancelled = 1;
- orig_err = virSaveLastError();
+ virErrorPreserveLast(&orig_err);
goto finish;
}
--
2.20.1