[Spice-devel] [PATCH v2 5/8] replay: Remove useless check

2016-09-15 Thread Frediano Ziglio
Same check is done inside replay_fscanf Signed-off-by: Frediano Ziglio --- server/red-replay-qxl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c index 28da13d..ef5569e 100644 --- a/server/red-replay-qxl.c +++ b/server/red-replay-qxl.c @@

[Spice-devel] [PATCH v2 6/8] replay: Assure read_binary receives a NULL pointer

2016-09-15 Thread Frediano Ziglio
read_binary do not allocate a buffer for no-NULL pointers. Avoid using uninitialized data and allocate proper buffer. Signed-off-by: Frediano Ziglio --- server/red-replay-qxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c i

[Spice-devel] [PATCH v2 8/8] replay: Propagate error correctly in replay_fread

2016-09-15 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/red-replay-qxl.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c index 73f9cd4..fe4f7a9 100644 --- a/server/red-replay-qxl.c +++ b/server/red-replay-qxl.c @@ -57,16 +57,15 @

[Spice-devel] [PATCH v2 7/8] replay: Update pointer in allocated list

2016-09-15 Thread Frediano Ziglio
Avoid to free invalid pointer. Signed-off-by: Frediano Ziglio --- server/red-replay-qxl.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c index 45c105c..73f9cd4 100644 --- a/server/red-replay-qxl.c +++ b/server/red-repl

[Spice-devel] [PATCH v2 4/8] replay: Detect errors from red_replay_data_chunks

2016-09-15 Thread Frediano Ziglio
Change the return to ssize_t to be able to distinguish from empty buffer to error. Check result returned and avoid continuing potentially deferencing NULL pointers. Signed-off-by: Frediano Ziglio --- server/red-replay-qxl.c | 37 ++--- 1 file changed, 26 insertion

[Spice-devel] [PATCH v2 2/8] replay: Record allocations in a GList to handle errors

2016-09-15 Thread Frediano Ziglio
Allocations are kept into a GList to be able to free in case some errors happened. Signed-off-by: Frediano Ziglio --- server/red-replay-qxl.c | 68 - 1 file changed, 56 insertions(+), 12 deletions(-) diff --git a/server/red-replay-qxl.c b/server/r

[Spice-devel] [PATCH v2 3/8] replay: Handle errors reading strings from record file

2016-09-15 Thread Frediano Ziglio
To check fscanf read all needed information a dummy "%n" is appended to any string and the value stored there is tested. This as scanf family could return a valid value but not entirely process the string so adding a "%n" and checking this was processed make sure all expected string is found. The c

[Spice-devel] [PATCH v2 0/8] Improve error handling in red-replay-qxl.c

2016-09-15 Thread Frediano Ziglio
Detect error in files and handle more gracefully. This version: - split the previous one; - update it; - fix different observations from Christophe. The last patch still contains the "old style". Could be true that if chaining could be not that readable but I'm not a big fun of too many goto eithe

[Spice-devel] [PATCH v2 1/8] replay: Rename eof to error

2016-09-15 Thread Frediano Ziglio
The eof variable and enumeration will be used for all errors so avoid confusion. Signed-off-by: Frediano Ziglio --- server/red-replay-qxl.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl

Re: [Spice-devel] [vdagent-linux v2 0/5] Reorganize vdagent Makefile and directory

2016-09-15 Thread Jonathon Jongsma
Series looks good to me. Jonathon On Thu, 2016-09-15 at 18:51 +0200, Victor Toso wrote: > Hi, second version. > > In the first patch, I've added the $(NULL), diff is here: > http://paste.fedoraproject.org/428487/73955986/ > > We now have a 4th patch that we might want to merge with the 3rd > p

Re: [Spice-devel] [PATCH v2 2/2] Add DisplayChannelPrivate struct

2016-09-15 Thread Jonathon Jongsma
On Thu, 2016-09-15 at 11:22 -0500, Jonathon Jongsma wrote: > Move all of the DisplayChannel data memembers into a private struct > to > encapsulate things better. This necessitated a few new 'public' > methods > and a small bit of refactoring to avoid poking into DisplayChannel > internals from too

[Spice-devel] [PATCH v2] Change RedCharDevice::write_queue to GQueue

2016-09-15 Thread Jonathon Jongsma
Change a couple more Rings to GQueue --- Changes in v2: - use GQueue instead of GQueue* server/char-device.c | 73 +--- server/char-device.h | 1 - 2 files changed, 29 insertions(+), 45 deletions(-) diff --git a/server/char-device.c b/server/char

Re: [Spice-devel] [PATCH v2 8/9] Change RedCharDevice::write_queue to GQueue

2016-09-15 Thread Jonathon Jongsma
On Thu, 2016-09-15 at 16:55 +0200, Pavel Grunt wrote: > Hey, > > On Wed, 2016-09-14 at 11:53 -0500, Jonathon Jongsma wrote: > > > > Change a couple more Rings to GQueue > > --- > > Changes in v2: > >  - use GQueue, not GList > > > >  server/char-device.c | 79 +---

[Spice-devel] [PATCH v2] Change RedCharDevicePrivate::clients to GList

2016-09-15 Thread Jonathon Jongsma
More Ring cleanup. At the moment, we only support a single client, so this is only a one-element list --- Changes in v2: - use safe loop in red_char_device_send_msg_to_clients() server/char-device.c | 71 +--- 1 file changed, 29 insertions(+), 42 d

Re: [Spice-devel] [PATCH v2 9/9] Change RedCharDevicePrivate::clients to GList

2016-09-15 Thread Jonathon Jongsma
On Thu, 2016-09-15 at 11:16 -0400, Frediano Ziglio wrote: > > > > > > More Ring cleanup. At the moment, we only support a single client, > > so > > this is only a one-element list > > --- > > Changes in v2: > >  - simplified red_char_device_finalize() to avoid using > > g_list_last() > > > >  se

Re: [Spice-devel] [RFC PATCH 2/2] Start writing some documentation on protocol

2016-09-15 Thread Jonathon Jongsma
On Thu, 2016-09-15 at 07:08 -0400, Frediano Ziglio wrote: > > > > > > On Fri, 2016-09-09 at 10:44 +0100, Frediano Ziglio wrote: > > > > > > Signed-off-by: Frediano Ziglio > > > --- > > >  docs/spice_protocol.txt | 48 > > > > > >  1 file changed,

[Spice-devel] [vdagent-linux v2 2/5] build-sys: get rid of noinst_HEADERS

2016-09-15 Thread Victor Toso
From: Marc-André Lureau Regular headers file should be listed in SOURCES Signed-off-by: Victor Toso Acked-by: Jonathon Jongsma Acked-by: Frediano Ziglio --- Makefile.am | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/Makefile.am b/Makefile.am

[Spice-devel] [vdagent-linux v2 3/5] build-sys: move user/system to respective dir

2016-09-15 Thread Victor Toso
From: Marc-André Lureau Signed-off-by: Victor Toso Acked-by: Jonathon Jongsma Acked-by: Frediano Ziglio --- Makefile.am | 57 +--- src/{ => vdagent}/vdagent-audio.c| 0 src/{ => vdagent}/vdagent-audio.h| 0 src/{ => vd

[Spice-devel] [vdagent-linux v2 5/5] buildsys: statis typo in configure option

2016-09-15 Thread Victor Toso
--- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2106085..0c2cfd8 100644 --- a/configure.ac +++ b/configure.ac @@ -73,7 +73,7 @@ AC_ARG_ENABLE([pciaccess], [enable_pciaccess="yes"]) AC_ARG_ENABLE([static-uinput

[Spice-devel] [vdagent-linux v2 1/5] build-sys: reformat Makefile.am

2016-09-15 Thread Victor Toso
Makes the makefile more readable and easy to change in the next few commits. Based on Marc-André Lureau patch. Acked-by: Jonathon Jongsma Acked-by: Frediano Ziglio --- Makefile.am | 98 ++--- 1 file changed, 67 insertions(+), 31 deletions

[Spice-devel] [vdagent-linux v2 4/5] build-sys: remove prefix from filenames

2016-09-15 Thread Victor Toso
--- .gitignore | 6 + Makefile.am| 28 +++--- src/vdagent/{vdagent-audio.c => audio.c} | 2 +- src/vdagent/{vdagent-audio.h => audio.h} | 4 ++-- src/vdagent/{vdagent-file-xfe

[Spice-devel] [vdagent-linux v2 0/5] Reorganize vdagent Makefile and directory

2016-09-15 Thread Victor Toso
Hi, second version. In the first patch, I've added the $(NULL), diff is here: http://paste.fedoraproject.org/428487/73955986/ We now have a 4th patch that we might want to merge with the 3rd patch... Having an extra patch helps with the review, I guess. The 5th patch is a small typo that I've ju

[Spice-devel] [PATCH v2 2/2] Add DisplayChannelPrivate struct

2016-09-15 Thread Jonathon Jongsma
Move all of the DisplayChannel data memembers into a private struct to encapsulate things better. This necessitated a few new 'public' methods and a small bit of refactoring to avoid poking into DisplayChannel internals from too many places. The DisplayChannel and the DisplayChannelClient are still

[Spice-devel] [PATCH v2 1/2] Improve encapsulation of DisplayChannel

2016-09-15 Thread Jonathon Jongsma
Add a couple new functions to the header so that they can be called by other objects rather than poking into the internals of the struct. --- server/dcc-send.c| 16 +-- server/display-channel.c | 71 server/display-channel.h | 37 +++

Re: [Spice-devel] [PATCH v2 8/9] Change RedCharDevice::write_queue to GQueue

2016-09-15 Thread Frediano Ziglio
> > Change a couple more Rings to GQueue > --- > Changes in v2: > - use GQueue, not GList > > server/char-device.c | 79 > +--- > server/char-device.h | 1 - > 2 files changed, 32 insertions(+), 48 deletions(-) > > diff --git a/server/char-devi

Re: [Spice-devel] [PATCH] replay: Handle errors in record file

2016-09-15 Thread Christophe Fergeau
Hey, On Mon, Sep 12, 2016 at 12:56:05PM +0100, Frediano Ziglio wrote: > Detect errors in record file. This can happen from a wrong version or > corruption of files. > Allocations are kept into a GList to be able to free in case some > errors happened. It would be nice to have this bit in a separa

Re: [Spice-devel] [PATCH v2 9/9] Change RedCharDevicePrivate::clients to GList

2016-09-15 Thread Frediano Ziglio
> > More Ring cleanup. At the moment, we only support a single client, so > this is only a one-element list > --- > Changes in v2: > - simplified red_char_device_finalize() to avoid using g_list_last() > > server/char-device.c | 68 > > 1 fi

Re: [Spice-devel] [PATCH v2 7/9] Make glz_dictionary_list a GList

2016-09-15 Thread Frediano Ziglio
> > Removing more intrusive RingItems from various structures and improving > readibility. > --- > no changes Acked-by: Frediano Ziglio Frediano > > server/image-encoders.c | 17 +++-- > 1 file changed, 7 insertions(+), 10 deletions(-) > > diff --git a/server/image-encoders.c b/

Re: [Spice-devel] [PATCH v2 8/9] Change RedCharDevice::write_queue to GQueue

2016-09-15 Thread Pavel Grunt
Hey, On Wed, 2016-09-14 at 11:53 -0500, Jonathon Jongsma wrote: > Change a couple more Rings to GQueue > --- > Changes in v2: >  - use GQueue, not GList > >  server/char-device.c | 79 +-- > - >  server/char-device.h |  1 - >  2 files changed, 32 ins

Re: [Spice-devel] spice performance tweaking

2016-09-15 Thread Rob Verduijn
Hi, I tried a virtual rhel7.3beta (server with gui) on a rhel7.3beta host. The host was a laptop to which I setup to use my old wifi router that only has 54Mbit so the bandwith was poor and unstable. Without the compression options the spice display was really bad. You could see the screen being

Re: [Spice-devel] [PATCH v2 1/9] Add DisplayChannelPrivate struct

2016-09-15 Thread Pavel Grunt
Hi, On Wed, 2016-09-14 at 11:53 -0500, Jonathon Jongsma wrote: > Move all of the DisplayChannel data memembers into a private struct > to > encapsulate things better. This necessitated a few new 'public' > methods the public methods could be introduced in a different patch, but it is not a big de

Re: [Spice-devel] [PATCH v2 2/9] Add CursorChannelPrivate struct

2016-09-15 Thread Pavel Grunt
On Wed, 2016-09-14 at 11:53 -0500, Jonathon Jongsma wrote: > Encapsulate private data of CursorChannel in a private struct. This > isn't very useful at the moment, but it will help prepare the way > for > porting the RedChannel heirarchy to GObject. Acked-by: Pavel Grunt > --- > Changes in v2: >

Re: [Spice-devel] spice performance tweaking

2016-09-15 Thread Rob Verduijn
Hello, The performance fixes sound awesome. I'm afraid I cannot test them in the environment with the low bandwith setup soon (maybe next week, but don't hold your breath) I'm going to build a local test setup to see if this is improving some of the issues. I got a laptop running the rhel7.3 beta,

Re: [Spice-devel] [PATCH spice-common] proto: Add agent features message

2016-09-15 Thread Marc-André Lureau
Hi - Original Message - > Hi, > > On Thu, Sep 15, 2016 at 09:01:30AM -0400, Marc-André Lureau wrote: > > Hi > > > > - Original Message - > > > Hi, > > > > > > On Thu, Sep 15, 2016 at 08:18:38AM -0400, Marc-André Lureau wrote: > > > > > > Actually, there is agent capabilities, I th

Re: [Spice-devel] [PATCH spice-common] proto: Add agent features message

2016-09-15 Thread Victor Toso
Hi, On Thu, Sep 15, 2016 at 09:01:30AM -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > Hi, > > > > On Thu, Sep 15, 2016 at 08:18:38AM -0400, Marc-André Lureau wrote: > > > > > Actually, there is agent capabilities, I think that's what the > > > > > server should be overri

Re: [Spice-devel] [PATCH spice-common] proto: Add agent features message

2016-09-15 Thread Marc-André Lureau
Hi - Original Message - > Hi, > > On Thu, Sep 15, 2016 at 08:18:38AM -0400, Marc-André Lureau wrote: > > > > Actually, there is agent capabilities, I think that's what the > > > > server should be overriding instead. > > > > > > I know that is possible but imo it is hack. It would be need

Re: [Spice-devel] [PATCH spice-common] proto: Add agent features message

2016-09-15 Thread Victor Toso
Hi, On Thu, Sep 15, 2016 at 08:18:38AM -0400, Marc-André Lureau wrote: > > > Actually, there is agent capabilities, I think that's what the > > > server should be overriding instead. > > > > I know that is possible but imo it is hack. It would be needed to > > filter VD_AGENT_ANNOUNCE_CAPABILITIES

Re: [Spice-devel] [PATCH spice-common] proto: Add agent features message

2016-09-15 Thread Pavel Grunt
On Thu, 2016-09-15 at 08:18 -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > Hi Marc-André, > > > > On Thu, 2016-09-15 at 06:28 -0400, Marc-André Lureau wrote: > > > Hi > > > > > > - Original Message - > > > > Hi > > > > > > > > - Original Message - > >

Re: [Spice-devel] [PATCH spice-common] proto: Add agent features message

2016-09-15 Thread Marc-André Lureau
Hi - Original Message - > Hi Marc-André, > > On Thu, 2016-09-15 at 06:28 -0400, Marc-André Lureau wrote: > > Hi > > > > - Original Message - > > > Hi > > > > > > - Original Message - > > > > The message is sent by server to the client to indicate > > > > which agent feat

Re: [Spice-devel] [PATCH spice-common] proto: Add agent features message

2016-09-15 Thread Pavel Grunt
Hi Marc-André, On Thu, 2016-09-15 at 06:28 -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > Hi > > > > - Original Message - > > > The message is sent by server to the client to indicate > > > which agent features are enabled or disabled by using flags. > > > > >

Re: [Spice-devel] spice performance tweaking

2016-09-15 Thread Frediano Ziglio
I saw you are using CentOS 7. I built the package with RHEL 7 (they are binary compatible). About the testing just which normal usage you should see improvements in bandwidth and reactivity. Changes from current CentOS package: - used a newer version, there are couple of changes that decreas

Re: [Spice-devel] [vdagent-linux v1 3/3] build-sys: move user/system to respective dir

2016-09-15 Thread Victor Toso
Hi, On Thu, Sep 15, 2016 at 06:56:06AM -0400, Frediano Ziglio wrote: > > > > From: Marc-André Lureau > > > > Signed-off-by: Victor Toso > > --- > > Makefile.am | 59 > > +--- > > src/{ => vdagent}/vdagent-audio.c| 0 > > src/{

Re: [Spice-devel] [vdagent-linux v1 1/3] build-sys: reformat Makefile.am

2016-09-15 Thread Victor Toso
Hi, On Thu, Sep 15, 2016 at 06:51:25AM -0400, Frediano Ziglio wrote: > > > > Makes the makefile more readable and easy to change in the next few > > commits. > > > > Based on Marc-André Lureau patch. > > --- > > Makefile.am | 94 > > +

Re: [Spice-devel] [RFC PATCH 2/2] Start writing some documentation on protocol

2016-09-15 Thread Frediano Ziglio
> > On Fri, 2016-09-09 at 10:44 +0100, Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio > > --- > >  docs/spice_protocol.txt | 48 > > > >  1 file changed, 48 insertions(+) > > > > diff --git a/docs/spice_protocol.txt b/docs/spice_protocol

Re: [Spice-devel] [vdagent-linux v1 3/3] build-sys: move user/system to respective dir

2016-09-15 Thread Frediano Ziglio
> > From: Marc-André Lureau > > Signed-off-by: Victor Toso > --- > Makefile.am | 59 > +--- > src/{ => vdagent}/vdagent-audio.c| 0 > src/{ => vdagent}/vdagent-audio.h| 0 > src/{ => vdagent}/vdagent-file-xfers.c |

Re: [Spice-devel] [vdagent-linux v1 1/3] build-sys: reformat Makefile.am

2016-09-15 Thread Frediano Ziglio
> > Makes the makefile more readable and easy to change in the next few > commits. > > Based on Marc-André Lureau patch. > --- > Makefile.am | 94 > + > 1 file changed, 63 insertions(+), 31 deletions(-) > > diff --git a/Makefile.am b/

Re: [Spice-devel] [PATCH spice-common] proto: Add agent features message

2016-09-15 Thread Marc-André Lureau
Hi - Original Message - > Hi > > - Original Message - > > The message is sent by server to the client to indicate > > which agent features are enabled or disabled by using flags. > > > > If a flag is set, then the corresponding feature is enabled. > > > > The message currently s

Re: [Spice-devel] [PATCH spice-common] proto: Add agent features message

2016-09-15 Thread Marc-André Lureau
Hi - Original Message - > The message is sent by server to the client to indicate > which agent features are enabled or disabled by using flags. > > If a flag is set, then the corresponding feature is enabled. > > The message currently supports info about copy & paste and file transfer.

[Spice-devel] [PATCH spice-protocol 2/2] Add support for reporting availability of agent features

2016-09-15 Thread Pavel Grunt
Some agent features can be disabled on the server: * Copy & Paste * File transfer Add a message to give this info to the client, so it doesn't try to use them. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1373725 --- spice/enums.h | 8 1 file changed, 8 insertions(+) diff --g

[Spice-devel] [RFC] Inform client about disabled features on server

2016-09-15 Thread Pavel Grunt
Hi! On the server it is possible to disabled some agent features: Copy & Paste and File transfer. Server then filters messages related to this features and discards. Since client is not aware that a feature is disabled, it keeps sending them. The issue is more obvious with File transfer which has

[Spice-devel] [PATCH spice-common] proto: Add agent features message

2016-09-15 Thread Pavel Grunt
The message is sent by server to the client to indicate which agent features are enabled or disabled by using flags. If a flag is set, then the corresponding feature is enabled. The message currently supports info about copy & paste and file transfer. Related: https://bugzilla.redhat.com/show_bu

[Spice-devel] [PATCH spice] Inform client about agent features

2016-09-15 Thread Pavel Grunt
Send the SPICE_MSG_MAIN_AGENT_FEATURES message containing information about enabled/disabled agent features when client connects. Currently supported features: * Copy & Paste * File transfer Related: https://bugzilla.redhat.com/show_bug.cgi?id=1373725 --- configure.ac | 2 +-

[Spice-devel] [PATCH spice-protocol 1/2] build-sys: post-release bump

2016-09-15 Thread Pavel Grunt
--- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index dd2d373..17f48d1 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.57]) m4_define([SPICE_MAJOR], 0) m4_define([SPICE_MINOR], 12) -m4_define([SPICE_MICR

[Spice-devel] [PATCH spice-gtk] main: Handle agent features message

2016-09-15 Thread Pavel Grunt
The message indicates that some agent features are enabled or disabled. Currently supported features: * Copy & Paste * File transfer It allows to avoid sending unnecessary agent messages. For compatibility reason all the features are considered enabled by default Resolves: https://bugzilla.red

Re: [Spice-devel] [PATCH 2/2] OpenSSL from 1.1.0 is thread safe by default

2016-09-15 Thread Christophe Fergeau
Hey, On Thu, Sep 15, 2016 at 12:24:15AM +0200, Sebastian Andrzej Siewior wrote: > On 2016-08-11 14:22:59 [+0100], Frediano Ziglio wrote: > > +++ b/server/reds.c > > @@ -2771,6 +2771,7 @@ static int ssl_password_cb(char *buf, int size, int > > flags, void *userdata) > > return (strlen(pass));

Re: [Spice-devel] [PATCH 2/2] OpenSSL from 1.1.0 is thread safe by default

2016-09-15 Thread Sebastian Andrzej Siewior
On 2016-08-11 14:22:59 [+0100], Frediano Ziglio wrote: > +++ b/server/reds.c > @@ -2771,6 +2771,7 @@ static int ssl_password_cb(char *buf, int size, int > flags, void *userdata) > return (strlen(pass)); > } > > +#if OPENSSL_VERSION_NUMBER < 0x101FL > static unsigned long pthreads_thre