Re: [Spice-devel] [PATCH v3 5/8] replay: Update pointer in allocated list

2016-09-20 Thread Jonathon Jongsma
On Fri, 2016-09-16 at 12:32 +0100, Frediano Ziglio wrote: > 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

Re: [Spice-devel] [PATCH v3 2/8] replay: Handle errors reading strings from record file

2016-09-20 Thread Jonathon Jongsma
On Tue, 2016-09-20 at 12:00 -0400, Frediano Ziglio wrote: > > > > > > On Fri, 2016-09-16 at 12:32 +0100, Frediano Ziglio wrote: > > > > > > 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 > > > fam

Re: [Spice-devel] [PATCH v3 4/8] replay: Move error check

2016-09-20 Thread Jonathon Jongsma
On Fri, 2016-09-16 at 12:32 +0100, Frediano Ziglio wrote: > Do the check after replay_fscanf to make sure everything > is fine before calling red_replay_compat_drawable or > red_replay_native_drawable. > > Signed-off-by: Frediano Ziglio > --- >  server/red-replay-qxl.c | 2 +- >  1 file changed, 1

Re: [Spice-devel] [PATCH v3 2/8] replay: Handle errors reading strings from record file

2016-09-20 Thread Frediano Ziglio
> > On Fri, 2016-09-16 at 12:32 +0100, Frediano Ziglio wrote: > > 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

Re: [Spice-devel] [PATCH v3 3/8] replay: Detect errors from red_replay_data_chunks

2016-09-20 Thread Jonathon Jongsma
On Fri, 2016-09-16 at 12:32 +0100, Frediano Ziglio wrote: > 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.

Re: [Spice-devel] [PATCH v3 2/8] replay: Handle errors reading strings from record file

2016-09-20 Thread Jonathon Jongsma
On Fri, 2016-09-16 at 12:32 +0100, Frediano Ziglio wrote: > 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 check

Re: [Spice-devel] [PATCH qxl-wddm-dod v4 03/10] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-20 Thread Javier Celaya
El mar, 20-09-2016 a las 15:56 +0300, Dmitry Fleytman escribió: > > On 20 Sep 2016, at 15:46 PM, Frediano Ziglio > > wrote: > > > > > > > On Tue, Sep 20, 2016 at 01:14:10PM +0300, Sameeh Jubran wrote: > > > > On Mon, Sep 12, 2016 at 11:32 AM, Frediano Ziglio < > > > > fzig...@redhat.com> > > > >

Re: [Spice-devel] [PATCH qxl-wddm-dod v4 03/10] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-20 Thread Javier Celaya
Hi, El mar, 20-09-2016 a las 12:27 +0200, Christophe Fergeau escribió: > On Tue, Sep 20, 2016 at 01:14:10PM +0300, Sameeh Jubran wrote: > > On Mon, Sep 12, 2016 at 11:32 AM, Frediano Ziglio < > > fzig...@redhat.com> > > wrote: > > > It looks like MmMapIoSpaceEx was introduced with Windows 10 while

[Spice-devel] [PATCH 3/3] Updated example files with SPICE port event listeners

2016-09-20 Thread Oliver Gutierrez
--- spice.html | 10 ++ spice_auto.html | 10 ++ 2 files changed, 20 insertions(+) diff --git a/spice.html b/spice.html index c473678..f9a91c0 100644 --- a/spice.html +++ b/spice.html @@ -42,6 +42,7 @@ + @@ -

[Spice-devel] [PATCH 1/3] Cleaning of trailing whitespaces

2016-09-20 Thread Oliver Gutierrez
--- enums.js| 2 +- main.js | 2 +- spice.html | 40 spice_auto.html | 2 +- spicemsg.js | 6 +++--- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/enums.js b/enums.js index 3ef36dc..301fea0 100644 --- a/enums.

[Spice-devel] [PATCH 2/3] SPICE port implementation

2016-09-20 Thread Oliver Gutierrez
--- enums.js| 9 +++ main.js | 3 +++ port.js | 85 + spicemsg.js | 18 + 4 files changed, 115 insertions(+) create mode 100644 port.js diff --git a/enums.js b/enums.js index 301fea0..b6e013c 100644 --- a/e

[Spice-devel] [PATCH v5] replay: Record allocations in a GList to handle errors

2016-09-20 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 | 74 +++-- 1 file changed, 59 insertions(+), 15 deletions(-) Changes from v4: - allocate command inside allo

Re: [Spice-devel] [PATCH] fixup! replay: Record allocations in a GList to handle errors

2016-09-20 Thread Frediano Ziglio
> > --- > server/red-replay-qxl.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c > index 7eddaf4..9c3df70 100644 > --- a/server/red-replay-qxl.c > +++ b/server/red-replay-qxl.c > @@ -1220,7 +1220,7 @@ SPICE_GNUC_VISI

[Spice-devel] [PATCH] fixup! replay: Record allocations in a GList to handle errors

2016-09-20 Thread Jonathon Jongsma
--- server/red-replay-qxl.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c index 7eddaf4..9c3df70 100644 --- a/server/red-replay-qxl.c +++ b/server/red-replay-qxl.c @@ -1220,7 +1220,7 @@ SPICE_GNUC_VISIBLE QXLCommandExt* s

Re: [Spice-devel] [PATCH v3 1/8] replay: Record allocations in a GList to handle errors

2016-09-20 Thread Jonathon Jongsma
On Tue, 2016-09-20 at 08:18 -0400, Frediano Ziglio wrote: > > > > > > On Mon, 2016-09-19 at 18:35 +0200, Victor Toso wrote: > > > > > > Hi, > > > > > > On Fri, Sep 16, 2016 at 12:32:54PM +0100, Frediano Ziglio wrote: > > > > > > > > > > > > Allocations are kept into a GList to be able to free

Re: [Spice-devel] [PATCH qxl-wddm-dod v4 03/10] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-20 Thread Dmitry Fleytman
> On 20 Sep 2016, at 15:46 PM, Frediano Ziglio wrote: > > >> On Tue, Sep 20, 2016 at 01:14:10PM +0300, Sameeh Jubran wrote: >>> On Mon, Sep 12, 2016 at 11:32 AM, Frediano Ziglio >>> wrote: It looks like MmMapIoSpaceEx was introduced with Windows 10 while WDDM was introduce in Wi

Re: [Spice-devel] [PATCH qxl-wddm-dod v4 03/10] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-20 Thread Christophe Fergeau
On Tue, Sep 20, 2016 at 08:46:56AM -0400, Frediano Ziglio wrote: > > > On Tue, Sep 20, 2016 at 01:14:10PM +0300, Sameeh Jubran wrote: > > > On Mon, Sep 12, 2016 at 11:32 AM, Frediano Ziglio > > > wrote: > > > > It looks like MmMapIoSpaceEx was introduced with Windows 10 while WDDM > > > > was >

Re: [Spice-devel] [PATCH qxl-wddm-dod v4 03/10] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-20 Thread Frediano Ziglio
> On Tue, Sep 20, 2016 at 01:14:10PM +0300, Sameeh Jubran wrote: > > On Mon, Sep 12, 2016 at 11:32 AM, Frediano Ziglio > > wrote: > > > It looks like MmMapIoSpaceEx was introduced with Windows 10 while WDDM > > > was > > > introduce in Windows 7. Are we going to support only from Windows 10? > >

[Spice-devel] [PATCH v3] RedChannel: Add FOREACH_CHANNEL_CLIENT and use it to iterate

2016-09-20 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/red-channel.c | 42 ++ 1 file changed, 18 insertions(+), 24 deletions(-) Changes from v2: - renamed FOREACH_CHANNEL macro to FOREACH_CHANNEL_CLIENT diff --git a/server/red-channel.c b/server/red-channel.c index 47

[Spice-devel] [PATCH v4] replay: Record allocations in a GList to handle errors

2016-09-20 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 | 73 - 1 file changed, 60 insertions(+), 13 deletions(-) Changed: - added a replay_free function and use

Re: [Spice-devel] [PATCH v3 1/8] replay: Record allocations in a GList to handle errors

2016-09-20 Thread Frediano Ziglio
> > Hi, > > On Fri, Sep 16, 2016 at 12:32:54PM +0100, Frediano Ziglio wrote: > > 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 > > --

Re: [Spice-devel] [PATCH v2 0/6] Reintroduce some macro to iterate containers

2016-09-20 Thread Jonathon Jongsma
On Tue, 2016-09-20 at 09:04 +0100, Frediano Ziglio wrote: > With the introduction of GList/GQueue these macro were removed > at the expense of some minor regressions. > First patch introduce macros for iterating generic Glist, > others use them. > > Frediano Ziglio (6): >   Introduce some macros t

Re: [Spice-devel] [PATCH v2 2/6] RedChannel: Add FOREACH_CHANNEL and use it to iterate

2016-09-20 Thread Jonathon Jongsma
On Tue, 2016-09-20 at 09:05 +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- >  server/red-channel.c | 42 ++ >  1 file changed, 18 insertions(+), 24 deletions(-) > > diff --git a/server/red-channel.c b/server/red-channel.c > index 474fe6

Re: [Spice-devel] [PATCH v3 1/8] replay: Record allocations in a GList to handle errors

2016-09-20 Thread Frediano Ziglio
> > On Mon, 2016-09-19 at 18:35 +0200, Victor Toso wrote: > > Hi, > > > > On Fri, Sep 16, 2016 at 12:32:54PM +0100, Frediano Ziglio wrote: > > > > > > Allocations are kept into a GList to be able to free in case some > > > errors happened. > > > > > > Signed-off-by: Frediano Ziglio > > > ---

Re: [Spice-devel] [PATCH 2/8] Simplify send_free_list

2016-09-20 Thread Uri Lublin
On 09/19/2016 03:42 PM, Frediano Ziglio wrote: What's the simplification -- always send two headers and possibly have the wait_m one empty ? The check for free_list->wait.header.wait_count was already done some lines above so I removed as always true. Ack. ___

Re: [Spice-devel] [PATCH qxl-wddm-dod v4 03/10] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-20 Thread Christophe Fergeau
On Tue, Sep 20, 2016 at 01:14:10PM +0300, Sameeh Jubran wrote: > On Mon, Sep 12, 2016 at 11:32 AM, Frediano Ziglio > wrote: > > It looks like MmMapIoSpaceEx was introduced with Windows 10 while WDDM was > > introduce in Windows 7. Are we going to support only from Windows 10? > > Windows 7 support

Re: [Spice-devel] [PATCH qxl-wddm-dod v4 03/10] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-20 Thread Sameeh Jubran
On Mon, Sep 12, 2016 at 11:32 AM, Frediano Ziglio wrote: > > > > Based on a patch by Sandy Stutsman > > > > Signed-off-by: Sameeh Jubran > > --- > > qxldod/QxlDod.cpp | 8 > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp >

[Spice-devel] [PATCH v2 4/6] Use proper FOREACH_DCC instead of FOREACH_CLIENT

2016-09-20 Thread Frediano Ziglio
FOREACH_DCC should be more DisplayChannel related. Signed-off-by: Frediano Ziglio --- server/display-channel.c | 22 +++--- server/red-worker.c | 2 +- server/stream.c | 12 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/server/displa

[Spice-devel] [PATCH v2 6/6] Base FOREACH_DCC on GLIST_FOREACH

2016-09-20 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/display-channel.c | 42 +- server/display-channel.h | 11 +++ server/red-worker.c | 4 ++-- server/stream.c | 24 4 files changed, 38 insertions(+), 43 deletions(-) d

[Spice-devel] [PATCH v2 5/6] Base FOREACH_CLIENT on GLIST_FOREACH

2016-09-20 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/main-channel.c | 20 ++-- server/red-channel.c | 36 ++-- server/red-channel.h | 12 +++- server/red-worker.c | 4 ++-- 4 files changed, 33 insertions(+), 39 deletions(-) diff --git a/server/ma

[Spice-devel] [PATCH v2 2/6] RedChannel: Add FOREACH_CHANNEL and use it to iterate

2016-09-20 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/red-channel.c | 42 ++ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/server/red-channel.c b/server/red-channel.c index 474fe68..9359bc4 100644 --- a/server/red-channel.c +++ b/server/red-channel.c

[Spice-devel] [PATCH v2 3/6] RedChannel: Use more FOREACH_CLIENT macro

2016-09-20 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/red-channel.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/server/red-channel.c b/server/red-channel.c index 9359bc4..f2aa0de 100644 --- a/server/red-channel.c +++ b/server/red-channel.c @@ -486,14 +486,13 @@ void red_cha

[Spice-devel] [PATCH v2 1/6] Introduce some macros to simplify iteration on GList

2016-09-20 Thread Frediano Ziglio
Noting that coding by hand these loop introduced some regression I'm trying to introduce back from macros. Before trying something harder to make possible to bind the type of the content I'm trying some simple macro as were before. I added the type to avoid some blindly void* casts. Also the GListI

[Spice-devel] [PATCH v2 0/6] Reintroduce some macro to iterate containers

2016-09-20 Thread Frediano Ziglio
With the introduction of GList/GQueue these macro were removed at the expense of some minor regressions. First patch introduce macros for iterating generic Glist, others use them. Frediano Ziglio (6): Introduce some macros to simplify iteration on GList RedChannel: Add FOREACH_CHANNEL and use

Re: [Spice-devel] [RFC PATCH 2/2] Introduce some macro to simplify iteration on GList

2016-09-20 Thread Frediano Ziglio
> > On 09/16/2016 06:06 PM, Frediano Ziglio wrote: > > Noting that coding by hand these loop introduced some regression > > I'm trying to introduce back from macros. > > Before trying something harder to make possible to bind the type of > > the content I'm trying some simple macro as were before.

[Spice-devel] [PATCH v2] Simplify send_free_list

2016-09-20 Thread Frediano Ziglio
The check for free_list->wait.header.wait_count was always true. Signed-off-by: Frediano Ziglio --- server/dcc-send.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) Changes since v1: - extended log message diff --git a/server/dcc-send.c b/server/dcc-send.c index 32c

[Spice-devel] [PATCH v2] Revert if to make code more readable

2016-09-20 Thread Frediano Ziglio
Keep all code to send SPICE_MSG_LIST together. Signed-off-by: Frediano Ziglio --- server/dcc-send.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Changed since v1: - moved comment diff --git a/server/dcc-send.c b/server/dcc-send.c index 1d05c68..32c6f17 100644 --- a/server/dcc-s