aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2015-02-05 17:43:35 +0800
committerGerd Hoffmann <kraxel@redhat.com>2015-02-16 08:47:59 +0100
commitf7801c5ce42250bf1e84d21bceb1802cfe4485e8 (patch)
tree23882625034553fd23aa0dd5efc019d6f5f95460
parent2779672fa3f0680e63ecfd3ee2d6ff360ce948a2 (diff)
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 <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--qmp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/qmp.c b/qmp.c
index 6b2c4bef3b..d701cff5ac 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);
}