[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH v2 01/10] vnc: refactor set_encodings
From: |
Corentin Chary |
Subject: |
[Qemu-devel] Re: [PATCH v2 01/10] vnc: refactor set_encodings |
Date: |
Tue, 18 May 2010 21:23:17 +0200 |
> I don't see your patch reversing the logic?
>
> Alex
>
>
Before my patch (not this one, but
http://git.qemu.org/qemu.git/commit/?id=14eb8b6829ad9dee7035de729e083844a425f274
), we looped from the last encoding to the first (for (i = n_encodings
- 1; i >= 0; i--)), so the code was ok.
Commit 14eb8b6829ad9dee7035de729e083844a425f274 was wrong because I
wanted `if (encoding == -1) encoding = enc`, not
`if (encoding != -1) encoding = enc`. With the current code the
encoding will never be set and will always be -1.
And this patch (refactor set_encoding) is also wrong, because it will
only set the first encoding (which is in fact the last, because we
start from the end of the array).
I believe that the right thing to do is to revert
14eb8b6829ad9dee7035de729e083844a425f274 and add some comments to
explain why we loop in reverse order.
--
Corentin Chary
http://xf.iksaif.net
- [Qemu-devel] Re: [PATCH v2 03/10] vnc: only use a single zlib stream, (continued)
[Qemu-devel] [PATCH v2 02/10] vnc: really call zlib if we want zlib, Corentin Chary, 2010/05/18
[Qemu-devel] [PATCH v2 01/10] vnc: refactor set_encodings, Corentin Chary, 2010/05/18
[Qemu-devel] [PATCH v2 10/10] vnc: update copyrights for vnc-encoding-tight.c, Corentin Chary, 2010/05/18
[Qemu-devel] [PATCH v2 04/10] vnc: adjust compression zstream level, Corentin Chary, 2010/05/18
[Qemu-devel] [PATCH v2 05/10] vnc: add basic tight support, Corentin Chary, 2010/05/18