提交 860341f6 编写于 作者: J Jamie Iles 提交者: Luiz Capitulino

monitor: fix build breakage for !CONFIG_VNC

Commit c62f6d1d (monitor: fix build breakage with --disable-vnc)
conditionalised some VNC setup code but left an unused variable.  Move
the variable into the conditional code to fix the build breakage.

Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: NJamie Iles <jamie@jamieiles.com>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 56a7a874
...@@ -1189,7 +1189,6 @@ static int add_graphics_client(Monitor *mon, const QDict *qdict, QObject **ret_d ...@@ -1189,7 +1189,6 @@ static int add_graphics_client(Monitor *mon, const QDict *qdict, QObject **ret_d
{ {
const char *protocol = qdict_get_str(qdict, "protocol"); const char *protocol = qdict_get_str(qdict, "protocol");
const char *fdname = qdict_get_str(qdict, "fdname"); const char *fdname = qdict_get_str(qdict, "fdname");
int skipauth = qdict_get_try_bool(qdict, "skipauth", 0);
CharDriverState *s; CharDriverState *s;
if (strcmp(protocol, "spice") == 0) { if (strcmp(protocol, "spice") == 0) {
...@@ -1203,6 +1202,7 @@ static int add_graphics_client(Monitor *mon, const QDict *qdict, QObject **ret_d ...@@ -1203,6 +1202,7 @@ static int add_graphics_client(Monitor *mon, const QDict *qdict, QObject **ret_d
#ifdef CONFIG_VNC #ifdef CONFIG_VNC
} else if (strcmp(protocol, "vnc") == 0) { } else if (strcmp(protocol, "vnc") == 0) {
int fd = monitor_get_fd(mon, fdname); int fd = monitor_get_fd(mon, fdname);
int skipauth = qdict_get_try_bool(qdict, "skipauth", 0);
vnc_display_add_client(NULL, fd, skipauth); vnc_display_add_client(NULL, fd, skipauth);
return 0; return 0;
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册