Re: [Spice-devel] [cacard 1/5] hex_dump: Remove unused arguments

2018-08-22 Thread Christophe Fergeau
Hey, On Tue, Aug 21, 2018 at 05:30:50PM +0200, Jakub Jelen wrote: > On Tue, 2018-08-21 at 17:03 +0200, Christophe Fergeau wrote: > > hex_dump() callers can theoretically provide the destination buffer > > for the hexdump'ed string, but nothing in libcacard uses that > > fea

Re: [Spice-devel] [PATCH libcacard] Use proper free function for PK11_ReadRawAttribute call

2018-08-22 Thread Christophe Fergeau
Looks good to me, Acked-by: Christophe Fergeau On Wed, Aug 15, 2018 at 10:30:38AM +0100, Frediano Ziglio wrote: > As documented in PK11_ReadRawAttribute data should be freed with > PORT_Free, not free or g_free. > > Signed-off-by: Frediano Ziglio > --- > src/vcard_emul_nss.c

Re: [Spice-devel] [PATCH libcacard v2 26/35] tests: Make sure we do not crash on bad data to sign

2018-08-21 Thread Christophe Fergeau
Hey, On Thu, Aug 02, 2018 at 11:43:58AM +0200, Jakub Jelen wrote: > diff --git a/tests/hwtests.c b/tests/hwtests.c > index 7beebac..bd8e439 100644 > --- a/tests/hwtests.c > +++ b/tests/hwtests.c > @@ -268,6 +268,85 @@ static void test_get_response_hw(void) { > test_get_response(); > } > >

Re: [Spice-devel] [PATCH spice] smartcard: set char device state

2018-08-21 Thread Christophe Fergeau
Hey, I've been trying to cut a spice-server release for a long time now, it's one of the patches I'd prefer to punt to after the release (which I was supposed to be doing today, but while testing it I hit these unrelated libcacard issues... :-/ ) Christophe On Mon, Aug 20, 2018 at 03:51:41PM

[Spice-devel] [cacard 4/5] aca: Fix off-by-one error when iterating over applets_table

2018-08-21 Thread Christophe Fergeau
It has elements from 0 to num_applets-1, and we were using elements from 0 to num_applets when iterating in cac_aca_get_applet_acr_coid() Signed-off-by: Christophe Fergeau --- src/cac-aca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cac-aca.c b/src/cac-aca.c index

[Spice-devel] [cacard 2/5] Fix 'platfrom' typo

2018-08-21 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- src/card_7816.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/card_7816.c b/src/card_7816.c index ccb63b6..298c0c5 100644 --- a/src/card_7816.c +++ b/src/card_7816.c @@ -17,7 +17,7 @@ /* Global Platform Card Manager applet AID

[Spice-devel] [cacard 5/5] aca: Mark local constants/data as const/static

2018-08-21 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- src/cac-aca.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/cac-aca.c b/src/cac-aca.c index 778772e..87b0911 100644 --- a/src/cac-aca.c +++ b/src/cac-aca.c @@ -131,7 +131,7 @@ struct acr_table { * 00

[Spice-devel] [cacard 5/5] hex_dump: Fix buffer overflow

2018-08-21 Thread Christophe Fergeau
. This commit ensures the output strings are properly sized to avoid this. Signed-off-by: Christophe Fergeau --- src/common.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common.c b/src/common.c index 0e90b0e..b3cd981 100644 --- a/src/common.c +++ b/src/common.c

[Spice-devel] [cacard 2/5] hex_dump: Mark source data as const

2018-08-21 Thread Christophe Fergeau
hex_dump() is not going to modify it. Signed-off-by: Christophe Fergeau --- src/common.c | 2 +- src/common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.c b/src/common.c index 6f835df..0e90b0e 100644 --- a/src/common.c +++ b/src/common.c @@ -56,7 +56,7

[Spice-devel] [cacard 1/5] hex_dump: Remove unused arguments

2018-08-21 Thread Christophe Fergeau
hex_dump() callers can theoretically provide the destination buffer for the hexdump'ed string, but nothing in libcacard uses that feature. This commit removes it. Signed-off-by: Christophe Fergeau --- src/cac-aca.c | 10 +- src/cac.c | 8 src/common.c | 19

[Spice-devel] [cacard 4/5] hex_dump: Add unit test

2018-08-21 Thread Christophe Fergeau
This test is currently failing under ASAN, the next commit will fix this. Signed-off-by: Christophe Fergeau --- Actually there are more failing tests with ASAN, I'll try to send patches to fix these too... tests/libcacard.c | 21 + 1 file changed, 21 insertions(+) diff

[Spice-devel] [cacard 3/5] ci: Add check using AddressSanitizer

2018-08-21 Thread Christophe Fergeau
hex_dump in git master currently has a 1 byte buffer overflow which valgrind is not able to catch, but asan detects it. Signed-off-by: Christophe Fergeau --- .gitlab-ci.yml | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4174e11

Re: [Spice-devel] [PATCH] Do not use static buffer to avoid possible races

2018-08-17 Thread Christophe Fergeau
Good catch, and the buffer is small enough that it's not a big deal if it's not static, and the data it contains is copied in this same block, so we don't need the buffer to stay alive for a prolonged time. Acked-by: Christophe Fergeau On Tue, Aug 14, 2018 at 10:35:56AM +0100, Frediano Ziglio

Re: [Spice-devel] [PATCH] Fix typo in comment

2018-08-17 Thread Christophe Fergeau
Yup, Acked-by: Christophe Fergeau On Tue, Aug 14, 2018 at 10:35:57AM +0100, Frediano Ziglio wrote: > Porprietary -> Proprietary > > Signed-off-by: Frediano Ziglio > --- > src/card_7816.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/

Re: [Spice-devel] [PATCH] win-usb-dev: Set UsbDk backend on libusb 1.0.22

2018-08-14 Thread Christophe Fergeau
On Tue, Aug 14, 2018 at 09:03:30AM +0200, Jorge Olmos wrote: > Hi, > On Mon, 2018-08-13 at 17:25 +0200, Christophe Fergeau wrote: > > Hey, > > > > On Mon, Aug 13, 2018 at 03:45:06PM +0200, Jorge Olmos wrote: > > > This patch configures libusb i

Re: [Spice-devel] [PATCH spice-server] Support h265 in stream-channel

2018-08-14 Thread Christophe Fergeau
On Mon, Aug 13, 2018 at 12:28:32PM -0400, Frediano Ziglio wrote: > > > > On Mon, Aug 13, 2018 at 11:41:31AM -0400, Frediano Ziglio wrote: > > > > > > > > Hey, > > > > > > > > At this point, I don't think we have anything which is going to give us > > > > an h265 encoded stream, and latest

[Spice-devel] [cacard v3] tests: Fix 'simpletlv' on i686 arches

2018-08-14 Thread Christophe Fergeau
the return value and avoid the failure. Signed-off-by: Christophe Fergeau --- tests/simpletlv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/simpletlv.c b/tests/simpletlv.c index cd0cd69..9ddc5b9 100644 --- a/tests/simpletlv.c +++ b/tests/simpletlv.c @@ -48,7 +48,7

Re: [Spice-devel] [cacard v2] tests: Fix 'simpletlv' on i686 arches

2018-08-14 Thread Christophe Fergeau
Sorry, this one is missing at least one hunk, will send a v3. Christophe On Tue, Aug 14, 2018 at 02:40:58PM +0200, Christophe Fergeau wrote: > The simpletlv_* functions return lengths as an int, but the test is > casting it to a size_t before comparing it against -1. This is not &g

[Spice-devel] [cacard] simpletlv: Slight improvement to API documentation

2018-08-14 Thread Christophe Fergeau
Document return value of simpletlv_get_length and simpletlv_encode and fix a few typos. --- src/simpletlv.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/simpletlv.h b/src/simpletlv.h index bf785e4..d12f52d 100644 --- a/src/simpletlv.h +++ b/src/simpletlv.h @@

[Spice-devel] [cacard v2] tests: Fix 'simpletlv' on i686 arches

2018-08-14 Thread Christophe Fergeau
the return value and avoid the failure. Signed-off-by: Christophe Fergeau --- tests/simpletlv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/simpletlv.c b/tests/simpletlv.c index cd0cd69..3e5958e 100644 --- a/tests/simpletlv.c +++ b/tests/simpletlv.c @@ -48,7 +48,7

Re: [Spice-devel] [cacard 1/2] tests: Add cert.cfg to EXTRA_DIST

2018-08-14 Thread Christophe Fergeau
On Mon, Aug 13, 2018 at 07:12:24PM +0200, Marc-André Lureau wrote: > On Mon, Aug 13, 2018 at 6:11 PM, Christophe Fergeau > wrote: > > Without it, make check from tarballs will fail. > > Actually make distcheck passes, but the tests are skipped, right? When running make ch

Re: [Spice-devel] [PATCH spice-server] Support h265 in stream-channel

2018-08-13 Thread Christophe Fergeau
On Mon, Aug 13, 2018 at 11:41:31AM -0400, Frediano Ziglio wrote: > > > > Hey, > > > > At this point, I don't think we have anything which is going to give us > > an h265 encoded stream, and latest spice-protocol release is fairly > > recent but does not have the SPICE_DISPLAY_CAP_CODEC_H265. I'd

[Spice-devel] [cacard 2/2] tests: Fix 'simpletlv' on i686 arches

2018-08-13 Thread Christophe Fergeau
The simpletlv_* functions return lengths as an int, but the test is casting it to a size_t before comparing it against -1. This is not giving the expected result on i686, causing the test to fail. Signed-off-by: Christophe Fergeau --- tests/simpletlv.c | 12 ++-- 1 file changed, 6

[Spice-devel] [cacard 1/2] tests: Add cert.cfg to EXTRA_DIST

2018-08-13 Thread Christophe Fergeau
Without it, make check from tarballs will fail. Signed-off-by: Christophe Fergeau --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index 16ec30c..f4e8009 100644 --- a/Makefile.am +++ b/Makefile.am @@ -141,6 +141,7 @@ EXTRA_DIST

Re: [Spice-devel] [PATCH spice-server] Support h265 in stream-channel

2018-08-13 Thread Christophe Fergeau
Hey, At this point, I don't think we have anything which is going to give us an h265 encoded stream, and latest spice-protocol release is fairly recent but does not have the SPICE_DISPLAY_CAP_CODEC_H265. I'd like to temporarily revert this commit for spice-server 0.14.1 so that it does not depend

Re: [Spice-devel] [PATCH] win-usb-dev: Set UsbDk backend on libusb 1.0.22

2018-08-13 Thread Christophe Fergeau
Hey, On Mon, Aug 13, 2018 at 03:45:06PM +0200, Jorge Olmos wrote: > This patch configures libusb in the context used in win-usb-dev, with > the same backend as the context initialized in usb-device-manager. > > Otherwise spice_usb_device_manager_libdev_match returns false for all > devices, and

Re: [Spice-devel] [cacard] simpletlv: Use GArray to make simpletlv_parse simpler

2018-08-13 Thread Christophe Fergeau
Hey, On Mon, Aug 13, 2018 at 02:56:43PM +0200, Jakub Jelen wrote: > On Mon, 2018-08-13 at 11:08 +0200, Christophe Fergeau wrote: > > This allows to get rid of manual reallocations. > > Thank you. This looks more elegant way. Assuming it still works and > passes the CI, it look

Re: [Spice-devel] [spice-server v2 2/2] build: Prepare for 0.14.1 release

2018-08-13 Thread Christophe Fergeau
On Mon, Aug 13, 2018 at 06:34:19AM -0400, Frediano Ziglio wrote: > > > > Signed-off-by: Christophe Fergeau > > --- > > NEWS | 33 + > > configure.ac | 2 +- > > 2 files changed, 34 insertions(+), 1 deletion(-) > &g

[Spice-devel] [spice-server v2 2/2] build: Prepare for 0.14.1 release

2018-08-13 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- NEWS | 33 + configure.ac | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 51bb4a2e6..1577b013f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,36 @@ +Major Changes in 0.14.1

[Spice-devel] [spice-server v2 1/2] docs: Add documentation for the streaming device

2018-08-13 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- docs/manual/manual.txt | 51 ++ 1 file changed, 51 insertions(+) diff --git a/docs/manual/manual.txt b/docs/manual/manual.txt index 40d080d9f..99f6a5c84 100644 --- a/docs/manual/manual.txt +++ b/docs/manual/manual.txt

Re: [Spice-devel] [RFC spice-vdagent 4/8] build: make GTK+ mandatory

2018-08-13 Thread Christophe Fergeau
On Thu, Aug 09, 2018 at 03:35:52PM +0200, Victor Toso wrote: > Hi, > > On Thu, May 31, 2018 at 10:52:21PM +0200, Jakub Janků wrote: > > Use GTK+ instead of Xlib where possible, > > remove Xlib code that handles clipboard. > > @teuf, double checking here if you think requiring gtk and > dropping

[Spice-devel] [cacard] simpletlv: Use GArray to make simpletlv_parse simpler

2018-08-13 Thread Christophe Fergeau
This allows to get rid of manual reallocations. Signed-off-by: Christophe Fergeau --- src/simpletlv.c | 37 +++-- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/src/simpletlv.c b/src/simpletlv.c index 6759ea7..0adba5a 100644 --- a/src/simpletlv.c

[Spice-devel] [cacard v2] simpletlv: Use g_malloc instead of malloc

2018-08-13 Thread Christophe Fergeau
This is more consistent with the rest of the codebase. Signed-off-by: Christophe Fergeau --- src/simpletlv.c | 35 --- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/src/simpletlv.c b/src/simpletlv.c index 42ff572..6759ea7 100644 --- a/src

Re: [Spice-devel] [cacard 6/7] cac-aca: Favour g_return_val_if_fail over g_assert

2018-08-10 Thread Christophe Fergeau
On Fri, Aug 10, 2018 at 05:18:15AM -0400, Frediano Ziglio wrote: > > @@ -1014,7 +1014,8 @@ static struct simpletlv_member aca_properties[1] = { > > static struct simpletlv_member * > > cac_aca_get_properties(size_t *properties_len) > > { > > -g_assert_nonnull(properties_len); > > +/*

Re: [Spice-devel] [cacard 4/7] simpletlv: Use g_malloc instead of malloc

2018-08-10 Thread Christophe Fergeau
On Fri, Aug 10, 2018 at 11:54:47AM +0200, Marc-André Lureau wrote: > On Fri, Aug 10, 2018 at 10:04 AM, Christophe Fergeau > wrote: > > This is more consistent with the rest of the codebase. > > > > Signed-off-by: Christophe Fergeau > >

[Spice-devel] [cacard 3/7] simpletlv: Remove unused #include

2018-08-10 Thread Christophe Fergeau
The SimpleTLV code does not call assert() Signed-off-by: Christophe Fergeau --- src/simpletlv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/simpletlv.c b/src/simpletlv.c index 30eb571..42ff572 100644 --- a/src/simpletlv.c +++ b/src/simpletlv.c @@ -28,7 +28,6 @@ #include #include

[Spice-devel] [cacard 7/7] cac: Mark the global aid data as const

2018-08-10 Thread Christophe Fergeau
This data is not meant to be modified, marking it as const allows it to be put in the .relro section, and could help catch unwanted modifications attempts. Signed-off-by: Christophe Fergeau --- src/cac.c | 36 ++-- src/card_7816.c | 10 +- src

[Spice-devel] [cacard 5/7] Favour g_assert over assert

2018-08-10 Thread Christophe Fergeau
Most of the code base is using g_assert, use it everywhere for consistency. Signed-off-by: Christophe Fergeau --- src/cac.c | 14 +++--- src/card_7816.c | 4 ++-- src/vcard.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cac.c b/src/cac.c index

[Spice-devel] [cacard 2/7] Fix 'arguemnts' typo

2018-08-10 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- src/simpletlv.c | 2 +- src/simpletlv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simpletlv.c b/src/simpletlv.c index 2f7618d..30eb571 100644 --- a/src/simpletlv.c +++ b/src/simpletlv.c @@ -241,7 +241,7 @@ simpletlv_read_tag

[Spice-devel] [cacard 1/7] Fix 'Reqested' typo

2018-08-10 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- src/cac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cac.c b/src/cac.c index ba63685..0e713cc 100644 --- a/src/cac.c +++ b/src/cac.c @@ -398,7 +398,7 @@ cac_common_process_apdu_read(VCard *card, VCardAPDU *apdu

[Spice-devel] [cacard 6/7] cac-aca: Favour g_return_val_if_fail over g_assert

2018-08-10 Thread Christophe Fergeau
Some g_assert are used to sanity-check input arguments of some methods. g_return_val_if_fail() is more appropriate for that as it won't cause the program using libcacard to terminate. The callers of these methods are already checking the return value for NULL. Signed-off-by: Christophe Fergeau

[Spice-devel] [cacard 4/7] simpletlv: Use g_malloc instead of malloc

2018-08-10 Thread Christophe Fergeau
This is more consistent with the rest of the codebase. Signed-off-by: Christophe Fergeau --- src/simpletlv.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/simpletlv.c b/src/simpletlv.c index 42ff572..17ab90e 100644 --- a/src/simpletlv.c +++ b

Re: [Spice-devel] [spice-gtk v2] usb-device-manager: Set UsbDk backend on libusb 1.0.22

2018-08-09 Thread Christophe Fergeau
Hey, Aside for these signed-of-by issues (would be nice if we had one from the original author, but we don't strictly enforce the use of it in spice in general, and imo no s-o-b is better than patch submitted anonymously), the patch looks good to me, so Acked-by: Christophe Fergeau On Tue, Aug

Re: [Spice-devel] [PATCH spice-server] test-stream-device: Expect the g_log warning about invalid message

2018-08-09 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Thu, Aug 09, 2018 at 11:25:09AM +0200, Lukáš Hrázký wrote: > Fixes test-stream-device after adding a log warning about an invalid > message received on the stream device, glib tests fail on unexpected > warning messages. > > Signed-off-b

Re: [Spice-devel] [PATCH libcacard 2/2] vreader: Handle read failure

2018-08-09 Thread Christophe Fergeau
On Thu, Aug 09, 2018 at 09:26:35AM +0200, Jakub Jelen wrote: > On Wed, 2018-08-08 at 14:08 -0400, Jason Andryuk wrote: > > On Wed, Aug 8, 2018 at 11:33 AM Jakub Jelen > > wrote: > > > > > > On Wed, 2018-08-08 at 16:51 +0200, Marc-André Lureau wrote: > > > > Hi > > > > > > > > On Tue, Jul 24,

[Spice-devel] [spice-server] build: Fix build from tarballs

2018-08-09 Thread Christophe Fergeau
by commit fcaf8d1a1 without breaking make distcheck. Signed-off-by: Christophe Fergeau --- server/dcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/dcc.c b/server/dcc.c index 9498e7de7..826dd28fe 100644 --- a/server/dcc.c +++ b/server/dcc.c @@ -24,7 +24,7 @@ #include

Re: [Spice-devel] [spice-server] build: Use <> rather than "" for including spice-server-enums.h

2018-08-08 Thread Christophe Fergeau
On Wed, Aug 08, 2018 at 04:19:53PM +0200, Christophe Fergeau wrote: > On Wed, Aug 08, 2018 at 07:13:28AM -0400, Frediano Ziglio wrote: > > > > > > When using #include "spice-server-enums.h", it will be looked up first > > > in the directory contain

Re: [Spice-devel] [PATCH spice-server v5 1/2] Add support for building with meson/ninja

2018-08-08 Thread Christophe Fergeau
On Tue, Aug 07, 2018 at 03:48:35AM -0400, Frediano Ziglio wrote: > > Acked-by: Frediano Ziglio Fwiw, I'd like to cut a spice-server release before we merge this.. Christophe signature.asc Description: PGP signature ___ Spice-devel mailing list

Re: [Spice-devel] [PATCH spice-server v5 1/2] Add support for building with meson/ninja

2018-08-08 Thread Christophe Fergeau
On Wed, Aug 08, 2018 at 10:10:06AM -0400, Frediano Ziglio wrote: > > > > On 08/08/18 08:12, Christophe Fergeau wrote: > > > On Mon, Jul 30, 2018 at 12:27:35PM -0300, Eduardo Lima (Etrunko) wrote: > > >> +# some global vars > > >> +spice_server_so_ver

Re: [Spice-devel] Regarding next Spice drivers release

2018-08-08 Thread Christophe Fergeau
Adding Yuri to cc: in case he missed that email. Christophe On Fri, Aug 03, 2018 at 12:15:03PM +0200, Victor Toso wrote: > Hi, > > On Wed, Aug 01, 2018 at 01:18:04PM -0500, Carlos González wrote: > > Apologizing beforehand; I read asking for ETAs is generally > > frowned at. > > No needs to

Re: [Spice-devel] [spice-server] build: Use <> rather than "" for including spice-server-enums.h

2018-08-08 Thread Christophe Fergeau
> Using #include instead allows the correct > > spice-server-enums.h file to be looked up. > > > > Signed-off-by: Christophe Fergeau > > --- > > server/dcc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a

Re: [Spice-devel] [PATCH spice-server v5 1/2] Add support for building with meson/ninja

2018-08-08 Thread Christophe Fergeau
On Wed, Aug 08, 2018 at 10:42:35AM -0300, Eduardo Lima (Etrunko) wrote: > On 08/08/18 08:12, Christophe Fergeau wrote: > > On Mon, Jul 30, 2018 at 12:27:35PM -0300, Eduardo Lima (Etrunko) wrote: > >> +# some global vars > >> +spice_server_so_version = '1.12.4

Re: [Spice-devel] [spice-server] build: Use <> rather than "" for including spice-server-enums.h

2018-08-08 Thread Christophe Fergeau
. > > Using #include instead allows the correct > > spice-server-enums.h file to be looked up. > > > > Signed-off-by: Christophe Fergeau > > --- > > server/dcc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a

Re: [Spice-devel] [PATCH spice-server v5 1/2] Add support for building with meson/ninja

2018-08-08 Thread Christophe Fergeau
On Mon, Jul 30, 2018 at 12:27:35PM -0300, Eduardo Lima (Etrunko) wrote: > +# some global vars > +spice_server_so_version = '1.12.4' How do we update this? With libtool, this was all documented, here it seems it's never going to be updated ;) Christophe signature.asc Description: PGP signature

[Spice-devel] [spice-server] build: Use <> rather than "" for including spice-server-enums.h

2018-08-08 Thread Christophe Fergeau
time won't be causing any problems, except when you happen to have an invalid spice-server-enums.h in $srcdir and you are doing an out-of-tree build. Using #include instead allows the correct spice-server-enums.h file to be looked up. Signed-off-by: Christophe Fergeau --- server/dcc.c | 2 +- 1 fi

Re: [Spice-devel] [PATCH spice-gtk] build-sys: disable celt051 by default when configure from autogen

2018-07-23 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Jul 23, 2018 at 01:23:46PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Avoid the new error message for explicit celt051 option. > > Signed-off-by: Marc-André Lureau > --- > autogen.sh | 2 +- > 1 f

Re: [Spice-devel] [spice-server v2] dcc: Rework COMPRESS_DEBUG macro

2018-07-20 Thread Christophe Fergeau
the > use of g_info. Ah, I initially also got g_message VS g_debug wrong, which I fixed in this v2, and I missed the misleading spice_info! Will amend before pushing. Christophe > > > convoluted to ensure that we will have a compile-time check for our > > g_debug ar

[Spice-devel] [spice-server v2] dcc: Rework COMPRESS_DEBUG macro

2018-07-20 Thread Christophe Fergeau
convoluted to ensure that we will have a compile-time check for our g_debug args. Signed-off-by: Christophe Fergeau --- Changes since v1: - adjust/fix commit log - use slighly more sophisticated COMPRESS_DEBUG macros for improved static checks server/image-encoders.c | 28 +-

Re: [Spice-devel] [spice-server v2 1/3] dcc: Fix QUIC fallback in get_compression_for_bitmap()

2018-07-20 Thread Christophe Fergeau
On Fri, Jul 20, 2018 at 11:46:38AM +0200, Christophe Fergeau wrote: > Slight screwup on my side, this is a single patch, not a series of 3 > patches as the email subject says. Ah and actually this is not even the patch I meant to send /o\ Sorry for the noise Christophe signatu

Re: [Spice-devel] [spice-server v2 1/3] dcc: Fix QUIC fallback in get_compression_for_bitmap()

2018-07-20 Thread Christophe Fergeau
Slight screwup on my side, this is a single patch, not a series of 3 patches as the email subject says. Christophe On Fri, Jul 20, 2018 at 11:44:51AM +0200, Christophe Fergeau wrote: > There was a small regression introduced in get_compression_for_bitmap() > by f401eb07f dcc: R

[Spice-devel] [spice-server v2 1/3] dcc: Fix QUIC fallback in get_compression_for_bitmap()

2018-07-20 Thread Christophe Fergeau
There was a small regression introduced in get_compression_for_bitmap() by f401eb07f dcc: Rewrite dcc_image_compress. If SPICE_IMAGE_COMPRESSION_AUTO_GLZ is specified, and the bitmap has a stride which is bigger than its width (ie it has padding), then get_compression_for_bitmap() will return

Re: [Spice-devel] [spice-server 3/3] dcc: Fix QUIC fallback in get_compression_for_bitmap()

2018-07-19 Thread Christophe Fergeau
On Thu, Jul 19, 2018 at 11:35:54AM -0400, Frediano Ziglio wrote: > Would be great to have a test case for this. > As the image was uncompressed this possibly affected also > network usage :-( Yes, tried to measure network bandwidth before/after this patch, and when this bug triggers, it seemed

Re: [Spice-devel] [spice-server] reds: Call sasl_server_done() when destroying SpiceServer instance

2018-07-19 Thread Christophe Fergeau
On Thu, Jul 19, 2018 at 10:18:47AM -0400, Frediano Ziglio wrote: > > > > > > > > This call will free most of the memory allocated by sasl_server_init(). > > > It's refcounted so should be safe to call from a library. > > > --- > > > server/reds.c | 1 + > > > 1 file changed, 1 insertion(+) > >

[Spice-devel] [spice-server 2/3] dcc: Rework COMPRESS_DEBUG macro

2018-07-19 Thread Christophe Fergeau
Rather than using #ifdef COMPRESS_DEBUG spice_info(...); #endif we can #define COMPRESS_DEBUG to spice_info() or nothing for a slight readability improvement. This opportunity is used to replace these spice_info() calls with g_message(). --- server/image-encoders.c | 27

[Spice-devel] [spice-server] worker: Fix 'seemless' typo in comment

2018-07-19 Thread Christophe Fergeau
--- server/red-worker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/red-worker.c b/server/red-worker.c index 721b1c843..ccab9d960 100644 --- a/server/red-worker.c +++ b/server/red-worker.c @@ -1339,7 +1339,7 @@ RedWorker* red_worker_new(QXLInstance *qxl,

[Spice-devel] [spice-server 1/3] dcc: Improve can_lz_compress() comment

2018-07-19 Thread Christophe Fergeau
Both glz_encode and lz_encode error out if the bitmap stride does not match the bitmap width. --- server/dcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/dcc.c b/server/dcc.c index a5d2b344a..44d8fdd75 100644 --- a/server/dcc.c +++ b/server/dcc.c @@ -759,7 +759,7

[Spice-devel] [spice-server 3/3] dcc: Fix QUIC fallback in get_compression_for_bitmap()

2018-07-19 Thread Christophe Fergeau
There was a small regression introduced in get_compression_for_bitmap() by f401eb07f dcc: Rewrite dcc_image_compress. If SPICE_IMAGE_COMPRESSION_AUTO_GLZ is specified, and the bitmap has a stride which is bigger than its width (ie it has padding), then get_compression_for_bitmap() will return

[Spice-devel] [spice-server] reds: Call sasl_server_done() when destroying SpiceServer instance

2018-07-19 Thread Christophe Fergeau
This call will free most of the memory allocated by sasl_server_init(). It's refcounted so should be safe to call from a library. --- server/reds.c | 1 + 1 file changed, 1 insertion(+) diff --git a/server/reds.c b/server/reds.c index 85043a88d..e195ce611 100644 --- a/server/reds.c +++

Re: [Spice-devel] how to set usb read-only transfer mode

2018-07-19 Thread Christophe Fergeau
Hey, On Thu, Jul 19, 2018 at 01:54:18PM +0900, 김갑용 wrote: > hi > > i'm downloading version spice-gtk 0.34 and it is under development. > If you redirect usb, you want to set it to read-only mode. > But libusb, usbdk seems to have no way. Is there a way to set this up? If your goal is to force

Re: [Spice-devel] [PATCH spice-server 0/5] Improve stream device test

2018-07-19 Thread Christophe Fergeau
For the series, Acked-by: Christophe Fergeau On Fri, Jul 13, 2018 at 08:33:13PM +0100, Frediano Ziglio wrote: > Multiple test and improvement to test, also minor fix to the device itself. > > Frediano Ziglio (5): > red-stream-device: Fix and check empty data messages > tes

Re: [Spice-devel] Spice console pixelated noise on display changes

2018-07-19 Thread Christophe Fergeau
On Tue, Jul 17, 2018 at 09:15:05AM +0200, Mitja Mihelič wrote: > > > On 12/07/2018 18:01, Christophe Fergeau wrote: > > Hey, > > > > On Wed, Jul 11, 2018 at 10:45:08AM +0200, Mitja Mihelič wrote: > > > Answering the question for posterity. > > > W

Re: [Spice-devel] VDAgent and XDMCP

2018-07-19 Thread Christophe Fergeau
Dey, On Tue, Jul 17, 2018 at 03:05:30PM +0200, Javier Celaya wrote: > Hello list > > I have a special scenario where I cannot get the VDAgent to run > correctly. We are migrating a physical setup to virtual, with Ubuntu > booting by PXE from a SLES server. Then, an X session is started with >

Re: [Spice-devel] [vdagent-win PATCH v6] Use GetModuleHandle to get some functions from user32 library

2018-07-19 Thread Christophe Fergeau
Still unconvinced about that one ;) But Acked-by: Christophe Fergeau if you feel this is the way to go. Christophe On Wed, Jul 18, 2018 at 11:52:45AM +0100, Frediano Ziglio wrote: > The library is surely already loaded as providing clipboard and > other utilities we need. > user

Re: [Spice-devel] [vdagent-win PATCH v6] vdagent: Add a comment around WinSta0_DesktopSwitch event usage

2018-07-19 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, Jul 18, 2018 at 11:52:46AM +0100, Frediano Ziglio wrote: > Multiple times while I was reading this code was not clear why the > synchronization of this event was not done in the main event loop. > Also document why we want to use it not rel

Re: [Spice-devel] [PATCH spice-common v2] spice*.proto: Replace tabs with the appropriate number of spaces

2018-07-19 Thread Christophe Fergeau
Fine with me, Acked-by: Christophe Fergeau (I checked with git diff -w that it's only whitespace changes) On Thu, Jul 19, 2018 at 10:47:11AM +0200, Lukáš Hrázký wrote: > Plus a few other indentation fixes. > > Signed-off-by: Lukáš Hrázký > --- > Changes since v1: > -

Re: [Spice-devel] [vdagent-win PATCH v5 6/6] vdagent: Stop correctly helper thread

2018-07-18 Thread Christophe Fergeau
we get WAIT_IO_COMPLETION when receiving an APC? Or is this obvious to someone familiar with windows? Acked-by: Christophe Fergeau even though we are exiting anyway, so I'd assume this is why it's not cleaned up properly? Christophe > case WAIT_TIMEOUT: > default: >

Re: [Spice-devel] [vdagent-win PATCH v5 5/6] vdagent: Add a comment around WinSta0_DesktopSwitch event usage

2018-07-18 Thread Christophe Fergeau
On Mon, Jul 09, 2018 at 09:51:43AM +0100, Frediano Ziglio wrote: > Multiple times while I was reading this code was not clear why the > sinchronization of this event was not done in the main event loop. synchronization > Also document why we want to use it not relying just on >

Re: [Spice-devel] [vdagent-win PATCH v5 3/6] Introduce an helper to close VirtIo device

2018-07-18 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Jul 09, 2018 at 09:51:41AM +0100, Frediano Ziglio wrote: > Do not assume we allocated the handle doing the cleanup. > This utility will be reused in next patch. > > Signed-off-by: Frediano Ziglio > Acked-by: Christophe de Dinechin &

Re: [Spice-devel] [vdagent-win PATCH v5 2/6] Use proper invalid value for _vio_serial

2018-07-18 Thread Christophe Fergeau
I would squash this in the next commit, but Acked-by: Christophe Fergeau if you prefer to keep them separate. Christophe On Mon, Jul 09, 2018 at 09:51:40AM +0100, Frediano Ziglio wrote: > For some reason kernel handles in Windows have 2 invalid values > depending on the type. Files/d

Re: [Spice-devel] [vdagent-win PATCH v5 4/6] Use destructor instead of cleanup function

2018-07-18 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Jul 09, 2018 at 09:51:42AM +0100, Frediano Ziglio wrote: > More C++ style. > Also avoids missing cleanup calls. > > Signed-off-by: Frediano Ziglio > Acked-by: Jonathon Jongsma > --- > vdagent/vdagent.cpp | 15 +++

Re: [Spice-devel] [vdagent-win PATCH v5 1/6] Use GetModuleHandle to get some functions from user32 library

2018-07-18 Thread Christophe Fergeau
On Mon, Jul 09, 2018 at 09:51:39AM +0100, Frediano Ziglio wrote: > The library is surely already loaded as providing clipboard and > other utilities we need. > Avoid using LoadLibrary that increment the reference so we don't > need to call FreeLibrary to cleanly decrement the reference. Dunno,

Re: [Spice-devel] [PATCH v2 2/2] Fix clang build error on missing

2018-07-18 Thread Christophe Fergeau
c/frame-log.cpp > index 63a8ac0..cc993cd 100644 > --- a/src/frame-log.cpp > +++ b/src/frame-log.cpp > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include I'd try to keep this list alphabetically ordered Acked-by: Christophe Fergeau Christophe signature.a

Re: [Spice-devel] [PATCH v2 1/2] Fix clang build error on [[noreturn]]

2018-07-18 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Jul 17, 2018 at 05:56:14PM +0200, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > The [[noreturn]] attribute must be visible from call sites. > This is a hard error in clang: > > cursor-updater.cpp:77:3: error:

[Spice-devel] [spice-html5 v2] display: Dump bitmap metadata in log_draw()

2018-07-17 Thread Christophe Fergeau
log_draw() is used to debug drawing commands by dumping drawing information to the JS console. This commit adds dumping of missing data for uncompressed bitmaps. The 'stride' parameter is important, as spice-html5 currently does not deal properly with such bitmaps. Signed-off-by: Christophe

Re: [Spice-devel] [spice-html5] display: Only use display channel with id 0

2018-07-17 Thread Christophe Fergeau
but unused > > org.spice-space.stream.0 spice port as this will create a 'fake' display > > channel which is offered by spice-server before the usual qxl display > > channel. > > This commit favours the display channel with id 0 rather than picking > > the

[Spice-devel] [spice-html5 v2] display: Only use display channel with id 0

2018-07-17 Thread Christophe Fergeau
is offered by spice-server before the usual qxl display channel. This commit favours the display channel with id 0 rather than picking the first one. Signed-off-by: Christophe Fergeau --- main.js | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 173ff97

Re: [Spice-devel] [spice-html5] display: Dump bitmap metadata in log_draw()

2018-07-17 Thread Christophe Fergeau
On Tue, Jul 17, 2018 at 09:00:33AM -0500, Jeremy White wrote: > > > > diff --git a/display.js b/display.js > > > > index 7719b23..c55b686 100644 > > > > --- a/display.js > > > > +++ b/display.js > > > > @@ -769,6 +769,12 @@ SpiceDisplayConn.prototype.log_draw = > > > > function(prefix, draw) > >

Re: [Spice-devel] [PATCH spice-gtk 2/2] spice-widget: Use proper pointer type for channel_new/channel_destroy

2018-07-17 Thread Christophe Fergeau
the 'expected' type for the last argument is a gpointer. Nothing checks for it/should be impacted by this change though. I'd squash the first patch into this one fwiw. Acked-by: Christophe Fergeau Christophe > Signed-off-by: Frediano Ziglio > --- > src/spice-widget.c | 10 -- >

Re: [Spice-devel] [PATCH spice-gtk] If replace me, should not do refcount plus one

2018-07-17 Thread Christophe Fergeau
On Tue, Jul 17, 2018 at 08:17:53AM +0100, Frediano Ziglio wrote: > From: 乐义华 > > When an image with SPICE_IMAGE_FLAGS_CACHE_REPLACE_ME is received the > reference counter should stay the same to avoid the cache to grow > continously. > > This fixes

Re: [Spice-devel] [spice-html5] display: Dump bitmap metadata in log_draw()

2018-07-17 Thread Christophe Fergeau
On Mon, Jul 16, 2018 at 10:03:23AM -0500, Jeremy White wrote: > Hey Christophe, > > On 07/12/2018 11:07 AM, Christophe Fergeau wrote: > > log_draw() is used to debug drawing commands by dumping drawing > > information to the JS console. This commit adds du

[Spice-devel] [spice-html5] display: Only use display channel with id 0

2018-07-17 Thread Christophe Fergeau
is offered by spice-server before the usual qxl display channel. This commit favours the display channel with id 0 rather than picking the first one. Signed-off-by: Christophe Fergeau --- main.js | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 173ff97

Re: [Spice-devel] [PATCH spice-server] reds: Free device chain in spice_server_destroy to avoid leaks

2018-07-13 Thread Christophe Fergeau
On Wed, Jul 11, 2018 at 05:30:25PM +0100, Frediano Ziglio wrote: > Leak detectors did not manage to find leaks, possibly as double list > have all elements likely with a pointer to them. > The reference from the agent is necessary for inserting it into > the list. > > Signed-off-by: Frediano

[Spice-devel] [spice-html5] display: Dump bitmap metadata in log_draw()

2018-07-12 Thread Christophe Fergeau
log_draw() is used to debug drawing commands by dumping drawing information to the JS console. This commit adds dumping of missing data for uncompressed bitmaps. The 'stride' parameter is important, as spice-html5 currently does not deal properly with such bitmaps. Signed-off-by: Christophe

Re: [Spice-devel] Spice console pixelated noise on display changes

2018-07-12 Thread Christophe Fergeau
Hey, On Wed, Jul 11, 2018 at 10:45:08AM +0200, Mitja Mihelič wrote: > Answering the question for posterity. > We found a temporary solution to the described problem. > We had an oVirt development cluster with a working SPICE console. By > comparing packages we have established the differences

Re: [Spice-devel] [PATCH spice-server] red-stream-device: Fix leaks in dispose and finalize chaining parent

2018-07-12 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, Jul 11, 2018 at 04:37:14PM +0100, Frediano Ziglio wrote: > dispose and finalize methods have to call parent relative > cleanup method to avoid leaking resources. > > Signed-off-by: Frediano Ziglio > --- > server/red-stream-device.c

Re: [Spice-devel] Closing gitlab spice mirror

2018-07-11 Thread Christophe Fergeau
On Wed, Jul 11, 2018 at 12:21:07PM +0200, Victor Toso wrote: > Hi, > > On Wed, Jul 11, 2018 at 11:00:26AM +0200, Christophe Fergeau wrote: > > On Tue, Jul 10, 2018 at 06:00:29PM +0200, Victor Toso wrote: > > > Hi, > > > > > > Similarly to closing gi

Re: [Spice-devel] [PATCH spice-server 2/2] glz-encoder-dict: Remove a warning compiling with CentOS 7

2018-07-11 Thread Christophe Fergeau
ver/glz-encoder-dict.c > @@ -489,7 +489,7 @@ static WindowImage > *glz_dictionary_window_add_image(SharedDictionary *dict, LzIm > { > unsigned int num_lines = num_first_lines; > unsigned int row; > -uint32_t seg_id, prev_seg_id; > +uint32_t seg_id, prev_seg_id = 0; I would split t

Re: [Spice-devel] [PATCH spice-server 1/2] ci: Run an additional make check using Centos

2018-07-11 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, Jul 11, 2018 at 09:06:07AM +0100, Frediano Ziglio wrote: > Make sure we can compile and run base tests using latest Centos. > > Signed-off-by: Frediano Ziglio > --- > .gitlab-ci.yml | 19 +++ > 1 file changed, 19 inser

Re: [Spice-devel] [PATCH spice-protocol v2] qxl_dev: Align QXLRam to 4 bytes

2018-07-11 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Jul 10, 2018 at 01:18:42PM +0100, Frediano Ziglio wrote: > This avoids compilers detect misaligned access which can lead to > warnings. > In QEMU the structure is allocated at the beginning of a 4Kb page, > in Xspice is allocated with

Re: [Spice-devel] [PATCH spice-common] tests: Join test-overflow and test-marshallers

2018-07-11 Thread Christophe Fergeau
On Tue, Jul 10, 2018 at 10:41:16AM -0300, Eduardo Lima (Etrunko) wrote: > On 10/07/18 07:31, Frediano Ziglio wrote: > >> > >> On Tue, Jul 10, 2018 at 04:51:35AM -0400, Frediano Ziglio wrote: > > On Tue, Jul 10, 2018 at 07:21:50AM +0100, Frediano Ziglio wrote: > > test-overflow was

<    1   2   3   4   5   6   7   8   9   10   >