diff mbox

monitor: fix build breakage for !CONFIG_VNC

Message ID 1312985922-9785-1-git-send-email-jamie@jamieiles.com
State New
Headers show

Commit Message

Jamie Iles Aug. 10, 2011, 2:18 p.m. UTC
Commit c62f6d1 (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: Jamie Iles <jamie@jamieiles.com>
---
 monitor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Luiz Capitulino Aug. 11, 2011, 8:37 p.m. UTC | #1
On Wed, 10 Aug 2011 15:18:42 +0100
Jamie Iles <jamie@jamieiles.com> wrote:

> Commit c62f6d1 (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: Jamie Iles <jamie@jamieiles.com>

Applied to the monitor branch, thanks.

> ---
>  monitor.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/monitor.c b/monitor.c
> index 1b8ba2c..fee572c 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -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 *fdname = qdict_get_str(qdict, "fdname");
> -    int skipauth = qdict_get_try_bool(qdict, "skipauth", 0);
>      CharDriverState *s;
>  
>      if (strcmp(protocol, "spice") == 0) {
> @@ -1203,6 +1202,7 @@ static int add_graphics_client(Monitor *mon, const QDict *qdict, QObject **ret_d
>  #ifdef CONFIG_VNC
>      } else if (strcmp(protocol, "vnc") == 0) {
>  	int fd = monitor_get_fd(mon, fdname);
> +        int skipauth = qdict_get_try_bool(qdict, "skipauth", 0);
>  	vnc_display_add_client(NULL, fd, skipauth);
>  	return 0;
>  #endif
diff mbox

Patch

diff --git a/monitor.c b/monitor.c
index 1b8ba2c..fee572c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -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 *fdname = qdict_get_str(qdict, "fdname");
-    int skipauth = qdict_get_try_bool(qdict, "skipauth", 0);
     CharDriverState *s;
 
     if (strcmp(protocol, "spice") == 0) {
@@ -1203,6 +1202,7 @@  static int add_graphics_client(Monitor *mon, const QDict *qdict, QObject **ret_d
 #ifdef CONFIG_VNC
     } else if (strcmp(protocol, "vnc") == 0) {
 	int fd = monitor_get_fd(mon, fdname);
+        int skipauth = qdict_get_try_bool(qdict, "skipauth", 0);
 	vnc_display_add_client(NULL, fd, skipauth);
 	return 0;
 #endif