From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] ui: replace printf() calls with VNC_DEBUG
Date: Mon, 16 Mar 2015 13:06:33 +0000 [thread overview]
Message-ID: <87k2yhay7a.fsf@linaro.org> (raw)
In-Reply-To: <1426509364-19513-3-git-send-email-berrange@redhat.com>
Daniel P. Berrange <berrange@redhat.com> writes:
> Handling of VNC audio messages results in printfs to the console.
> This is of no use to anyone in production, so should be using the
> normal VNC_DEBUG macro instead.
>
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> ui/vnc.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/ui/vnc.c b/ui/vnc.c
> index 6f9b718..80dc63b 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -2400,34 +2400,34 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
> case 4: vs->as.fmt = AUD_FMT_U32; break;
> case 5: vs->as.fmt = AUD_FMT_S32; break;
> default:
> - printf("Invalid audio format %d\n", read_u8(data, 4));
> + VNC_DEBUG("Invalid audio format %d\n", read_u8(data, 4));
> vnc_client_error(vs);
> break;
> }
> vs->as.nchannels = read_u8(data, 5);
> if (vs->as.nchannels != 1 && vs->as.nchannels != 2) {
> - printf("Invalid audio channel coount %d\n",
> - read_u8(data, 5));
> + VNC_DEBUG("Invalid audio channel coount %d\n",
> + read_u8(data, 5));
> vnc_client_error(vs);
> break;
> }
> vs->as.freq = read_u32(data, 6);
> break;
> default:
> - printf ("Invalid audio message %d\n", read_u8(data, 4));
> + VNC_DEBUG("Invalid audio message %d\n", read_u8(data, 4));
> vnc_client_error(vs);
> break;
> }
> break;
>
> default:
> - printf("Msg: %d\n", read_u16(data, 0));
> + VNC_DEBUG("Msg: %d\n", read_u16(data, 0));
> vnc_client_error(vs);
> break;
> }
> break;
> default:
> - printf("Msg: %d\n", data[0]);
> + VNC_DEBUG("Msg: %d\n", data[0]);
> vnc_client_error(vs);
> break;
> }
--
Alex Bennée
next prev parent reply other threads:[~2015-03-16 13:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 12:36 [Qemu-devel] [PATCH 0/3] Misc fixes for VNC Daniel P. Berrange
2015-03-16 12:36 ` [Qemu-devel] [PATCH 1/3] ui: remove unused 'wiremode' variable in VncState struct Daniel P. Berrange
2015-03-16 13:03 ` Alex Bennée
2015-03-16 12:36 ` [Qemu-devel] [PATCH 2/3] ui: replace printf() calls with VNC_DEBUG Daniel P. Berrange
2015-03-16 13:06 ` Alex Bennée [this message]
2015-03-16 12:36 ` [Qemu-devel] [PATCH 3/3] ui: fix VNC websockets TLS integration Daniel P. Berrange
2015-03-16 13:17 ` Alex Bennée
2015-03-16 13:35 ` Daniel P. Berrange
2015-03-17 10:59 ` Daniel P. Berrange
2015-03-17 7:36 ` Gerd Hoffmann
2015-03-17 10:20 ` Daniel P. Berrange
2015-03-17 10:50 ` Gerd Hoffmann
2015-03-17 10:58 ` Daniel P. Berrange
2015-03-17 10:33 ` Daniel P. Berrange
2015-03-17 10:54 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k2yhay7a.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.