Blame 0423-monitor-fix-client_migrate_info-error-handling.patch
|
Hans de Goede |
56753f |
From 63f3e6ee49e0a88bbd7915d81962c9046205c411 Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
56753f |
From: Yonit Halperin <yhalperi@redhat.com>
|
|
Hans de Goede |
56753f |
Date: Sun, 18 Mar 2012 09:42:39 +0200
|
|
Hans de Goede |
56753f |
Subject: [PATCH 423/434] monitor: fix client_migrate_info error handling
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
Report QERR_MISSING_PARAMETER when port is missing. Otherwise
|
|
Hans de Goede |
56753f |
QERR_UNDEFINED_ERROR will occur.
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
rhbz #795652
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
|
|
Hans de Goede |
56753f |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
56753f |
---
|
|
Hans de Goede |
56753f |
monitor.c | 5 +++++
|
|
Hans de Goede |
56753f |
1 file changed, 5 insertions(+)
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
diff --git a/monitor.c b/monitor.c
|
|
Hans de Goede |
56753f |
index 3c23aa4..76739d7 100644
|
|
Hans de Goede |
56753f |
--- a/monitor.c
|
|
Hans de Goede |
56753f |
+++ b/monitor.c
|
|
Hans de Goede |
56753f |
@@ -1046,6 +1046,11 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict,
|
|
Hans de Goede |
56753f |
return -1;
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
+ if (port == -1 && tls_port == -1) {
|
|
Hans de Goede |
56753f |
+ qerror_report(QERR_MISSING_PARAMETER, "port/tls-port");
|
|
Hans de Goede |
56753f |
+ return -1;
|
|
Hans de Goede |
56753f |
+ }
|
|
Hans de Goede |
56753f |
+
|
|
Hans de Goede |
56753f |
ret = qemu_spice_migrate_info(hostname, port, tls_port, subject,
|
|
Hans de Goede |
56753f |
cb, opaque);
|
|
Hans de Goede |
56753f |
if (ret != 0) {
|
|
Hans de Goede |
56753f |
--
|
|
Hans de Goede |
56753f |
1.7.10
|
|
Hans de Goede |
56753f |
|