* [Qemu-devel] [PATCH] monitor: fix client_migrate_info error handling
@ 2012-03-18 7:42 Yonit Halperin
2012-03-19 8:49 ` Alon Levy
2012-03-19 11:57 ` Gerd Hoffmann
0 siblings, 2 replies; 3+ messages in thread
From: Yonit Halperin @ 2012-03-18 7:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Yonit Halperin, kraxel
Report QERR_INVALID_PARAMETER when port is missing. Otherwise
QERR_UNDEFINED_ERROR will occur.
rhbz #795652
Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
---
monitor.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/monitor.c b/monitor.c
index d57e7bf..8f46031 100644
--- a/monitor.c
+++ b/monitor.c
@@ -880,6 +880,11 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict,
return -1;
}
+ if (port == -1 && tls_port == -1) {
+ qerror_report(QERR_MISSING_PARAMETER, "port/tls-port");
+ return -1;
+ }
+
ret = qemu_spice_migrate_info(hostname, port, tls_port, subject,
cb, opaque);
if (ret != 0) {
--
1.7.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] monitor: fix client_migrate_info error handling
2012-03-18 7:42 [Qemu-devel] [PATCH] monitor: fix client_migrate_info error handling Yonit Halperin
@ 2012-03-19 8:49 ` Alon Levy
2012-03-19 11:57 ` Gerd Hoffmann
1 sibling, 0 replies; 3+ messages in thread
From: Alon Levy @ 2012-03-19 8:49 UTC (permalink / raw)
To: Yonit Halperin; +Cc: qemu-devel, kraxel
On Sun, Mar 18, 2012 at 09:42:39AM +0200, Yonit Halperin wrote:
> Report QERR_INVALID_PARAMETER when port is missing. Otherwise
> QERR_UNDEFINED_ERROR will occur.
>
> rhbz #795652
>
Reviewed-by: Alon Levy <alevy@redhat.com>
> Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
> ---
> monitor.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/monitor.c b/monitor.c
> index d57e7bf..8f46031 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -880,6 +880,11 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict,
> return -1;
> }
>
> + if (port == -1 && tls_port == -1) {
> + qerror_report(QERR_MISSING_PARAMETER, "port/tls-port");
> + return -1;
> + }
> +
> ret = qemu_spice_migrate_info(hostname, port, tls_port, subject,
> cb, opaque);
> if (ret != 0) {
> --
> 1.7.7.6
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] monitor: fix client_migrate_info error handling
2012-03-18 7:42 [Qemu-devel] [PATCH] monitor: fix client_migrate_info error handling Yonit Halperin
2012-03-19 8:49 ` Alon Levy
@ 2012-03-19 11:57 ` Gerd Hoffmann
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2012-03-19 11:57 UTC (permalink / raw)
To: Yonit Halperin; +Cc: qemu-devel
On 03/18/12 08:42, Yonit Halperin wrote:
> Report QERR_INVALID_PARAMETER when port is missing. Otherwise
> + qerror_report(QERR_MISSING_PARAMETER, "port/tls-port");
Fixed commit message & added to spice patch queue.
thanks,
Gerd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-19 11:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-18 7:42 [Qemu-devel] [PATCH] monitor: fix client_migrate_info error handling Yonit Halperin
2012-03-19 8:49 ` Alon Levy
2012-03-19 11:57 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).