qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix incorrect attempt to clear a flag in vnc.c
@ 2009-02-14 12:48 Brian Kress
  2009-02-14 21:06 ` Anthony Liguori
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Kress @ 2009-02-14 12:48 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 263 bytes --]

In vnc.c in pixel_format_message, the code tries to clear the 
QEMU_ALLOCATED_FLAG
from the client display surface, however it uses the wrong operator and 
ends up enabling all
other flags.  Most notably this enables the big endian flag and causes 
some chaos. 


[-- Attachment #2: patch.flagfix --]
[-- Type: text/plain, Size: 502 bytes --]

Index: vnc.c
===================================================================
--- vnc.c	(revision 6619)
+++ vnc.c	(working copy)
@@ -1421,7 +1421,7 @@
     else if (vs->ds->surface->pf.bits_per_pixel == 8)
         vs->send_hextile_tile = send_hextile_tile_8;
     vs->clientds = *(vs->ds->surface);
-    vs->clientds.flags |= ~QEMU_ALLOCATED_FLAG;
+    vs->clientds.flags &= ~QEMU_ALLOCATED_FLAG;
     vs->write_pixels = vnc_write_pixels_copy;
 
     vnc_write(vs, pad, 3);           /* padding */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix incorrect attempt to clear a flag in vnc.c
  2009-02-14 12:48 [Qemu-devel] [PATCH] Fix incorrect attempt to clear a flag in vnc.c Brian Kress
@ 2009-02-14 21:06 ` Anthony Liguori
  2009-02-14 21:20   ` Brian Kress
  0 siblings, 1 reply; 4+ messages in thread
From: Anthony Liguori @ 2009-02-14 21:06 UTC (permalink / raw)
  To: qemu-devel

Brian Kress wrote:
> In vnc.c in pixel_format_message, the code tries to clear the 
> QEMU_ALLOCATED_FLAG
> from the client display surface, however it uses the wrong operator 
> and ends up enabling all
> other flags.  Most notably this enables the big endian flag and causes 
> some chaos.
Can you add a Signed-off-by line?

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix incorrect attempt to clear a flag in vnc.c
  2009-02-14 21:06 ` Anthony Liguori
@ 2009-02-14 21:20   ` Brian Kress
  2009-04-07 19:59     ` Aurelien Jarno
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Kress @ 2009-02-14 21:20 UTC (permalink / raw)
  To: qemu-devel

Anthony Liguori wrote:
> Brian Kress wrote:
>> In vnc.c in pixel_format_message, the code tries to clear the 
>> QEMU_ALLOCATED_FLAG
>> from the client display surface, however it uses the wrong operator 
>> and ends up enabling all
>> other flags.  Most notably this enables the big endian flag and 
>> causes some chaos.
> Can you add a Signed-off-by line?
>
Signed-off-by: Brian Kress <kressb@moose.net>

Index: vnc.c
===================================================================
--- vnc.c	(revision 6619)
+++ vnc.c	(working copy)
@@ -1421,7 +1421,7 @@
     else if (vs->ds->surface->pf.bits_per_pixel == 8)
         vs->send_hextile_tile = send_hextile_tile_8;
     vs->clientds = *(vs->ds->surface);
-    vs->clientds.flags |= ~QEMU_ALLOCATED_FLAG;
+    vs->clientds.flags &= ~QEMU_ALLOCATED_FLAG;
     vs->write_pixels = vnc_write_pixels_copy;
 
     vnc_write(vs, pad, 3);           /* padding */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix incorrect attempt to clear a flag in vnc.c
  2009-02-14 21:20   ` Brian Kress
@ 2009-04-07 19:59     ` Aurelien Jarno
  0 siblings, 0 replies; 4+ messages in thread
From: Aurelien Jarno @ 2009-04-07 19:59 UTC (permalink / raw)
  To: Brian Kress; +Cc: qemu-devel

On Sat, Feb 14, 2009 at 04:20:51PM -0500, Brian Kress wrote:
> Anthony Liguori wrote:
>> Brian Kress wrote:
>>> In vnc.c in pixel_format_message, the code tries to clear the  
>>> QEMU_ALLOCATED_FLAG
>>> from the client display surface, however it uses the wrong operator  
>>> and ends up enabling all
>>> other flags.  Most notably this enables the big endian flag and  
>>> causes some chaos.
>> Can you add a Signed-off-by line?
>>
> Signed-off-by: Brian Kress <kressb@moose.net>

Thanks, applied.

> Index: vnc.c
> ===================================================================
> --- vnc.c	(revision 6619)
> +++ vnc.c	(working copy)
> @@ -1421,7 +1421,7 @@
>     else if (vs->ds->surface->pf.bits_per_pixel == 8)
>         vs->send_hextile_tile = send_hextile_tile_8;
>     vs->clientds = *(vs->ds->surface);
> -    vs->clientds.flags |= ~QEMU_ALLOCATED_FLAG;
> +    vs->clientds.flags &= ~QEMU_ALLOCATED_FLAG;
>     vs->write_pixels = vnc_write_pixels_copy;
>
>     vnc_write(vs, pad, 3);           /* padding */
>
>
>
>

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-07 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-14 12:48 [Qemu-devel] [PATCH] Fix incorrect attempt to clear a flag in vnc.c Brian Kress
2009-02-14 21:06 ` Anthony Liguori
2009-02-14 21:20   ` Brian Kress
2009-04-07 19:59     ` Aurelien Jarno

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).