From: Gonglei Date: Thu, 5 Feb 2015 09:43:35 +0000 (+0800) Subject: vnc: auto assian an id when calling change vnc qmp interface X-Git-Tag: v2.3.0-rc0~59^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7801c5ce42250bf1e84d21bceb1802cfe4485e8;p=thirdparty%2Fqemu.git vnc: auto assian an id when calling change vnc qmp interface Only in this way, change vnc qmp interface can take effect, because qemu_opts_find(&qemu_vnc_opts, id) will return NULL in vnc_display_open(), It can't connect successfully vnc server forever. Signed-off-by: Gonglei Signed-off-by: Gerd Hoffmann --- diff --git a/qmp.c b/qmp.c index 6b2c4bef3b2..d701cff5ac1 100644 --- a/qmp.c +++ b/qmp.c @@ -387,6 +387,11 @@ static void qmp_change_vnc_listen(const char *target, Error **errp) qemu_opts_del(opts); } opts = vnc_parse_func(target); + if (!opts) { + return; + } + + vnc_auto_assign_id(olist, opts); vnc_display_open("default", errp); }