[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] qemu: error message should show uri instead of (null)



于 2011年08月15日 21:43, Daniel Veillard 写道:
On Mon, Aug 15, 2011 at 02:58:47PM +0200, Peter Krempa wrote:
Fix pointer for error message uri if domain migration fails.

BZ# 730244
---
  src/qemu/qemu_migration.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 4d0e062..d900020 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2079,7 +2079,7 @@ static int doPeer2PeerMigrate(struct qemud_driver *driver,
      qemuDomainObjExitRemoteWithDriver(driver, vm);
      if (dconn == NULL) {
          qemuReportError(VIR_ERR_OPERATION_FAILED,
-                        _("Failed to connect to remote libvirt URI %s"), uri);
+                        _("Failed to connect to remote libvirt URI %s"), dconnuri);
          return -1;
      }

   Seems to me that if dconnuri was NULL we would certainly hit dconn == NULL
as a result. That said we were printing the wrong URL so that's still an
improvement :-)

     maybe use (dconnuri ? dconnuri : "NULL")

This should be NULLSTR(dconnuri).

or test and make 2 spearate messages, but that probably excessive :-)

Daniel



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]