From: Anthony Liguori <aliguori@us.ibm.com>
To: Philipp Hahn <hahn@univention.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Rate limit vnc_write_pixels_generic
Date: Mon, 07 May 2012 09:19:57 -0500 [thread overview]
Message-ID: <4FA7DA0D.6030303@us.ibm.com> (raw)
In-Reply-To: <bd5d360e4e95c89f5d0179205b4bef90526db395.1336399330.git.hahn@univention.de>
On 05/07/2012 08:58 AM, Philipp Hahn wrote:
> Only print the error message once per change and also include the actual
> unsupported color depth in bytes per pixel in the error message.
>
> Signed-off-by: Philipp Hahn<hahn@univention.de>
Under what conditions are you seeing this happen?
Regards,
Anthony Liguori
> ---
> ui/vnc.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/ui/vnc.c b/ui/vnc.c
> index deb9ecd..9dcff9b 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -641,6 +641,7 @@ static void vnc_write_pixels_generic(VncState *vs, struct PixelFormat *pf,
> void *pixels1, int size)
> {
> uint8_t buf[4];
> + static uint8_t last_error_bpp = 4; /* any of the supported formats */
>
> if (pf->bytes_per_pixel == 4) {
> uint32_t *pixels = pixels1;
> @@ -667,7 +668,12 @@ static void vnc_write_pixels_generic(VncState *vs, struct PixelFormat *pf,
> vnc_write(vs, buf, vs->clientds.pf.bytes_per_pixel);
> }
> } else {
> - fprintf(stderr, "vnc_write_pixels_generic: VncState color depth not supported\n");
> + if (last_error_bpp != pf->bytes_per_pixel) {
> + last_error_bpp = pf->bytes_per_pixel;
> + fprintf(stderr,
> + "vnc_write_pixels_generic: VncState color depth %d not supported\n",
> + pf->bytes_per_pixel);
> + }
> }
> }
>
next prev parent reply other threads:[~2012-05-07 14:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-07 13:58 [Qemu-devel] [PATCH] Rate limit vnc_write_pixels_generic Philipp Hahn
2012-05-07 14:19 ` Anthony Liguori [this message]
2012-05-07 15:04 ` Philipp Hahn
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=4FA7DA0D.6030303@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=hahn@univention.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).