[Spice-devel] [PATCH 5/9] move is_low_bandwidth to DisplayChannelClient

2016-08-04 Thread Jonathon Jongsma
From: Frediano Ziglio The field is only used by DisplayChannelClient, not by CursorChannelClient Signed-off-by: Frediano Ziglio --- server/dcc-private.h | 1 + server/dcc-send.c| 2 +- server/dcc.c | 17 - server/dcc.h | 2 ++ server/displ

[Spice-devel] [PATCH 6/9] remove CommonGraphicsChannelClient structure

2016-08-04 Thread Jonathon Jongsma
From: Frediano Ziglio Was just containing a RedChannelClient field Signed-off-by: Frediano Ziglio --- server/cache-item.tmpl.c | 2 +- server/cursor-channel.c | 4 ++-- server/dcc-private.h | 2 +- server/dcc.c | 10 +- server/red-worker.h | 4 server/str

[Spice-devel] [PATCH 1/9] Limit direct access to DisplayChannelClient

2016-08-04 Thread Jonathon Jongsma
From: Frediano Ziglio Add a few more methods and accessors so that other files don't need to manipulate the struct members directly. Move the struct definition to a private header which only the dcc-* files will include. --- server/Makefile.am | 1 + server/dcc-private.h | 62

[Spice-devel] [PATCH 9/9] Move CursorChannelClient to separate file

2016-08-04 Thread Jonathon Jongsma
--- server/Makefile.am | 2 + server/cursor-channel-client.c | 120 + server/cursor-channel-client.h | 50 + server/cursor-channel.c| 101 -- server/cursor-channel.h| 12 + s

[Spice-devel] [PATCH 7/9] Miscellaneous header changes

2016-08-04 Thread Jonathon Jongsma
--- server/display-channel.c | 2 ++ server/display-channel.h | 2 -- server/red-record-qxl.c | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index 555bae2..4f52b79 100644 --- a/server/display-channel.c +++ b/server/display

[Spice-devel] [PATCH 3/9] move during_target_migrate out of common_graphics_channel_new_client

2016-08-04 Thread Jonathon Jongsma
From: Frediano Ziglio This reduce function and void to change an object in a function which is supposed just to create a new object Signed-off-by: Frediano Ziglio --- server/cursor-channel.c | 2 +- server/dcc.c| 3 ++- server/red-worker.c | 2 -- server/red-worker.h | 1 -

[Spice-devel] [PATCH 4/9] remove common_graphics_channel_new_client function

2016-08-04 Thread Jonathon Jongsma
From: Frediano Ziglio The function was just calling another function with same parameters Signed-off-by: Frediano Ziglio --- server/cursor-channel.c | 16 server/dcc.c| 9 + server/red-worker.c | 20 server/red-worker.h | 10 --

[Spice-devel] [PATCH 2/9] move channel window setting to config_socket

2016-08-04 Thread Jonathon Jongsma
From: Frediano Ziglio Make common_graphics_channel_new_client smaller Signed-off-by: Frediano Ziglio --- server/red-worker.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/server/red-worker.c b/server/red-worker.c index 9238632..f15f67a 100644 --- a/server/red

[Spice-devel] [PATCH 0/9] Spice server refactory patches (Aug 4)

2016-08-04 Thread Jonathon Jongsma
I've rebased my refactory branch to latest master and it's now time to start getting the rest of these patches merged. Here's a fairly small set to start with. Frediano Ziglio (6): Limit direct access to DisplayChannelClient move channel window setting to config_socket move during_target_mig

Re: [Spice-devel] [usbredir v2] usbredirhost: fix leak on error

2016-08-04 Thread Victor Toso
Hi, On Thu, Aug 04, 2016 at 02:33:26PM +0200, Pavel Grunt wrote: > Ack Thanks, pushed: https://cgit.freedesktop.org/spice/usbredir/commit/?id=908686a6e0ba28937532b136 > > On Thu, 2016-08-04 at 14:15 +0200, Victor Toso wrote: > > Pointed by coverity: > >  17. usbredir-0.7.1/usbredirhost/usbredirh

Re: [Spice-devel] [spice-gtk 2/3] wocky: Set ConnectAsyncData instance as GTask data

2016-08-04 Thread Victor Toso
Hi, On Wed, Aug 03, 2016 at 09:49:52AM +0200, Christophe Fergeau wrote: > Currently, the ConnectAsyncData instance is leaked if for example > we trigger one codepath calling g_task_return_error(). If we > associate it with the GTask with g_task_set_task_data(), > this kind of leak will be avoided.

Re: [Spice-devel] [spice-gtk v2] wocky: Simplify wocky_http_proxy_connect_finish()

2016-08-04 Thread Victor Toso
Hi, On Thu, Aug 04, 2016 at 04:57:11PM +0200, Christophe Fergeau wrote: > Rather than returning the whole ConnectAsyncData struct with > g_task_return_pointer(), we can return only the GIOStream object as this > is what we are interested in. > > This has the side-effect of fixing a ConnectAsyncDat

Re: [Spice-devel] [client] streaming: Don't crash if the stream creation fails

2016-08-04 Thread Victor Toso
Hi, On Mon, Jul 25, 2016 at 07:11:05PM +0200, Francois Gouget wrote: > Signed-off-by: Francois Gouget > --- > > As far as I can tell there is no way to tell the server that the stream > creation failed. So the client will still receive the video as a stream > and won't be able to display it. But

[Spice-devel] [spice-gtk v2] wocky: Simplify wocky_http_proxy_connect_finish()

2016-08-04 Thread Christophe Fergeau
Rather than returning the whole ConnectAsyncData struct with g_task_return_pointer(), we can return only the GIOStream object as this is what we are interested in. This has the side-effect of fixing a ConnectAsyncData leak as after calling g_task_propagate_pointer() the old code had ownership of t

Re: [Spice-devel] [PATCH win-vdagent] Adding ioctl operation to update Vdagent state

2016-08-04 Thread Victor Toso
Hi, On Thu, Aug 04, 2016 at 05:07:35PM +0300, Dmitry Fleytman wrote: > >>> On Thu, Aug 04, 2016 at 06:34:14AM -0700, Dmitry Fleytman wrote: > Hi Victor, > > How do we configure server mouse with VDAgent running? > >>> > >>> You mean the host/VM configuration? What I mean by my quest

Re: [Spice-devel] [PATCH win-vdagent] Adding ioctl operation to update Vdagent state

2016-08-04 Thread Dmitry Fleytman
> On 4 Aug 2016, at 17:02 PM, Victor Toso wrote: > > Hi, > > On Thu, Aug 04, 2016 at 05:00:33PM +0300, Dmitry Fleytman wrote: >> >>> On 4 Aug 2016, at 16:44 PM, Victor Toso wrote: >>> >>> Hi, >>> >>> On Thu, Aug 04, 2016 at 06:34:14AM -0700, Dmitry Fleytman wrote: Hi Victor,

Re: [Spice-devel] [PATCH win-vdagent] Adding ioctl operation to update Vdagent state

2016-08-04 Thread Victor Toso
Hi, On Thu, Aug 04, 2016 at 05:00:33PM +0300, Dmitry Fleytman wrote: > > > On 4 Aug 2016, at 16:44 PM, Victor Toso wrote: > > > > Hi, > > > > On Thu, Aug 04, 2016 at 06:34:14AM -0700, Dmitry Fleytman wrote: > >> Hi Victor, > >> > >> How do we configure server mouse with VDAgent running? > >

Re: [Spice-devel] [PATCH win-vdagent] Adding ioctl operation to update Vdagent state

2016-08-04 Thread Dmitry Fleytman
> On 4 Aug 2016, at 16:44 PM, Victor Toso wrote: > > Hi, > > On Thu, Aug 04, 2016 at 06:34:14AM -0700, Dmitry Fleytman wrote: >> Hi Victor, >> >> How do we configure server mouse with VDAgent running? > > You mean the host/VM configuration? What I mean by my question is that > we can send a S

Re: [Spice-devel] [PATCH win-vdagent] Adding ioctl operation to update Vdagent state

2016-08-04 Thread Victor Toso
Hi, On Thu, Aug 04, 2016 at 06:34:14AM -0700, Dmitry Fleytman wrote: > Hi Victor, > > How do we configure server mouse with VDAgent running? You mean the host/VM configuration? What I mean by my question is that we can send a SpiceMsgcMainMouseModeRequest from client to change mouse mode and I wo

Re: [Spice-devel] [PATCH win-vdagent] Adding ioctl operation to update Vdagent state

2016-08-04 Thread Dmitry Fleytman
Hi Victor, How do we configure server mouse with VDAgent running? Thanks, Dmitry On Thu, Aug 4, 2016 at 6:30 AM, Victor Toso wrote: > Hi, > > On Wed, Aug 03, 2016 at 06:45:29PM +0300, Sameeh Jubran wrote: > > This patch adds new ioctl operation to Vdagent in order to update > > the driver on

Re: [Spice-devel] [PATCH win-vdagent] Adding ioctl operation to update Vdagent state

2016-08-04 Thread Victor Toso
Hi, On Wed, Aug 03, 2016 at 06:45:29PM +0300, Sameeh Jubran wrote: > This patch adds new ioctl operation to Vdagent in order to update > the driver on Vdagent state. This allows the driver to know > when Vdagent is running and when it is off. > > Spice supports two mouse modes: server and client.

Re: [Spice-devel] [spice-gtk 3/3] wocky: Pass GTask around instead of ConnectAsyncData

2016-08-04 Thread Victor Toso
Hi, On Wed, Aug 03, 2016 at 09:49:53AM +0200, Christophe Fergeau wrote: > Now that the ConnectAsyncData we need is set as GTask data, we can pass > around the GTask rather than the ConnectAsyncData instance, and remove > the GTask pointer from it. We can get the ConnectAsyncData from the > GTask w

Re: [Spice-devel] [spice-gtk 1/3] wocky: Simplify wocky_http_proxy_connect_finish()

2016-08-04 Thread Christophe Fergeau
On Thu, Aug 04, 2016 at 03:13:38PM +0200, Victor Toso wrote: > Hi, > > On Wed, Aug 03, 2016 at 09:49:51AM +0200, Christophe Fergeau wrote: > > Rather than returning the whole ConnectAsyncData struct with > > g_task_return_pointer(), we can return only the GIOStream object as this > > is what we ar

Re: [Spice-devel] [spice-gtk 1/3] wocky: Simplify wocky_http_proxy_connect_finish()

2016-08-04 Thread Victor Toso
Hi, On Wed, Aug 03, 2016 at 09:49:51AM +0200, Christophe Fergeau wrote: > Rather than returning the whole ConnectAsyncData struct with > g_task_return_pointer(), we can return only the GIOStream object as this > is what we are interested in. > This has the side-effect of fixing a ConnectAsyncData

Re: [Spice-devel] question: how to test the gstreamer:h264 with qemu ?

2016-08-04 Thread Frediano Ziglio
> > -Original Message- > > From: cferg...@redhat.com [mailto:cferg...@redhat.com] > > Sent: Friday, July 29, 2016 4:19 PM > > To: Li, ZhijianX > > Cc: gou...@codeweavers.com; Spice-devel@lists.freedesktop.org > > Subject: Re: [Spice-devel] question: how to test the gstreamer:h264 with > >

Re: [Spice-devel] question: how to test the gstreamer:h264 with qemu ?

2016-08-04 Thread Li, ZhijianX
> -Original Message- > From: cferg...@redhat.com [mailto:cferg...@redhat.com] > Sent: Friday, July 29, 2016 4:19 PM > To: Li, ZhijianX > Cc: gou...@codeweavers.com; Spice-devel@lists.freedesktop.org > Subject: Re: [Spice-devel] question: how to test the gstreamer:h264 with > qemu ? > >

Re: [Spice-devel] [usbredir v2] usbredirhost: fix leak on error

2016-08-04 Thread Pavel Grunt
Ack On Thu, 2016-08-04 at 14:15 +0200, Victor Toso wrote: > Pointed by coverity: >  17. usbredir-0.7.1/usbredirhost/usbredirhost.c:2306: leaked_storage: >  Returning without freeing "data" leaks the storage that it points to. >  #  2304| >  #  usbredirhost_bulk_packet_complete(transfer->transfer);

Re: [Spice-devel] [usbredir v2] usbredirhost: Fix coverity sign_extension warning

2016-08-04 Thread Victor Toso
Hi, On Thu, Aug 04, 2016 at 08:18:19AM -0400, Frediano Ziglio wrote: > > > > Complain from coverity: > > usbredir-0.7.1/usbredirhost/usbredirhost.c:1159: sign_extension: > > Suspicious implicit sign extension: "max_packetsize" with type > > "unsigned short" (16 bits, unsigned) is promoted in >

Re: [Spice-devel] [usbredir v2] usbredirhost: avoid access to null pointer

2016-08-04 Thread Pavel Grunt
On Thu, 2016-08-04 at 13:57 +0200, Victor Toso wrote: > ERROR() is a wrapper for va_log() which takes usbredirhost* as first > argument. We can't use it if host == NULL. Changing to fprintf to not > fail the function silently. > > This was catched by coverity: >  3. usbredir-0.7.1/usbredirhost/usb

Re: [Spice-devel] [usbredir v2] usbredirhost: Fix coverity sign_extension warning

2016-08-04 Thread Frediano Ziglio
> > Complain from coverity: > usbredir-0.7.1/usbredirhost/usbredirhost.c:1159: sign_extension: > Suspicious implicit sign extension: "max_packetsize" with type > "unsigned short" (16 bits, unsigned) is promoted in > "pkts_per_transfer * transfer_count * max_packetsize" to type "int" > (32 bit

Re: [Spice-devel] [PATCH] Adding new ioctl for updating Vdagent state

2016-08-04 Thread Christophe Fergeau
On Thu, Aug 04, 2016 at 02:02:08PM +0300, Sameeh Jubran wrote: > New ioctl for updating the driver with vdagent running state. Please add some rationale to the commit log for having this (ie what is going to be achieved with that escape). For what it's worth, I don't think the QXL driver should n

[Spice-devel] [usbredir v2] usbredirhost: fix leak on error

2016-08-04 Thread Victor Toso
Pointed by coverity: 17. usbredir-0.7.1/usbredirhost/usbredirhost.c:2306: leaked_storage: Returning without freeing "data" leaks the storage that it points to. # 2304| # usbredirhost_bulk_packet_complete(transfer->transfer); # 2305| } # 2306|-> } # 2307| # 2308| static void us

Re: [Spice-devel] [PATCH win-vdagent v3 1/2] Introducing Windows CCD API

2016-08-04 Thread Frediano Ziglio
> > The Connecting and Configuring Displays (CCD) Win32 APIs > provide more control over the desktop display setup. The CCD APIs > move away from using Windows Graphics Device Interface (GDI) > concepts like view name and toward Windows Display Driver Model > (WDDM) concepts like adapter, source,

[Spice-devel] [usbredir v2] usbredirhost: avoid access to null pointer

2016-08-04 Thread Victor Toso
ERROR() is a wrapper for va_log() which takes usbredirhost* as first argument. We can't use it if host == NULL. Changing to fprintf to not fail the function silently. This was catched by coverity: 3. usbredir-0.7.1/usbredirhost/usbredirhost.c:1412: var_deref_model: Passing null pointer "host"

Re: [Spice-devel] [usbredir v1] usbredirhost: fix leak on error

2016-08-04 Thread Victor Toso
Hi, On Thu, Aug 04, 2016 at 01:42:06PM +0200, Pavel Grunt wrote: > On Thu, 2016-08-04 at 13:38 +0200, Victor Toso wrote: > > Hi, > > > > On Thu, Aug 04, 2016 at 08:37:02AM +0200, Pavel Grunt wrote: > > > > > > Hey > > > > > > On Wed, 2016-08-03 at 18:11 +0200, Victor Toso wrote: > > > > > > >

Re: [Spice-devel] [usbredir v1] usbredirhost: fix leak on error

2016-08-04 Thread Pavel Grunt
On Thu, 2016-08-04 at 13:38 +0200, Victor Toso wrote: > Hi, > > On Thu, Aug 04, 2016 at 08:37:02AM +0200, Pavel Grunt wrote: > > > > Hey > > > > On Wed, 2016-08-03 at 18:11 +0200, Victor Toso wrote: > > > > > > Pointed by coverity: > > >  17. usbredir-0.7.1/usbredirhost/usbredirhost.c:2306: lea

Re: [Spice-devel] [usbredir v1] usbredirhost: fix leak on error

2016-08-04 Thread Victor Toso
Hi, On Thu, Aug 04, 2016 at 08:37:02AM +0200, Pavel Grunt wrote: > Hey > > On Wed, 2016-08-03 at 18:11 +0200, Victor Toso wrote: > > Pointed by coverity: > >  17. usbredir-0.7.1/usbredirhost/usbredirhost.c:2306: leaked_storage: > >  Returning without freeing "data" leaks the storage that it point

Re: [Spice-devel] [usbredir v1] usbredirhost: avoid access to null pointer

2016-08-04 Thread Victor Toso
Hi, On Thu, Aug 04, 2016 at 08:30:47AM +0200, Pavel Grunt wrote: > On Wed, 2016-08-03 at 18:59 +0200, Victor Toso wrote: > > Another coverity complain. > Does it say where it is potentially called with null host ? Oh, indeed it does and the complain makes sense :) I'll drop this patch and change

[Spice-devel] [PATCH win-vdagent v3 2/2] Implementing multiple monitors and arbitrary resolution

2016-08-04 Thread Sameeh Jubran
The Direct3D 9 API operates on either the Windows XP display driver model (XPDM) or the Windows Vista display driver model (WDDM), depending on the operating system installed. This patch implements the WDDM interface while using the CCD API to do so. Moreover it introduces multiple monitors suppor

[Spice-devel] [PATCH win-vdagent v3 0/2] Adding multiple monitors and arbitrary resolution for Windows 10

2016-08-04 Thread Sameeh Jubran
Diffrences from previous patch: * Replaced LoadLibrary/FreeLibrary with GetModuleHandle. * Replaced malloc/free with new(std::nothrow)/delete Sameeh Jubran (2): Introducing Windows CCD API Implementing multiple monitors and arbitrary resolution Makefile.am |2 +

[Spice-devel] [PATCH win-vdagent v3 1/2] Introducing Windows CCD API

2016-08-04 Thread Sameeh Jubran
The Connecting and Configuring Displays (CCD) Win32 APIs provide more control over the desktop display setup. The CCD APIs move away from using Windows Graphics Device Interface (GDI) concepts like view name and toward Windows Display Driver Model (WDDM) concepts like adapter, source, and target id

[Spice-devel] [PATCH] Adding new ioctl for updating Vdagent state

2016-08-04 Thread Sameeh Jubran
New ioctl for updating the driver with vdagent running state. Signed-off-by: Sameeh Jubran --- spice/qxl_windows.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spice/qxl_windows.h b/spice/qxl_windows.h index bc2ceff..6e557f7 100644 --- a/spice/qxl_windows.h +++ b/spi

[Spice-devel] [PATCH spice-protocol] Adding a new ioctl for windows header

2016-08-04 Thread Sameeh Jubran
This patch adds the necessary stuctures and definitions to spice-protocol in order to define a new ioctl fow Windows. It should be applied along with this patch: https://lists.freedesktop.org/archives/spice-devel/2016-August/031056.html Sameeh Jubran (1): Adding new ioctl for updating Vdagent

Re: [Spice-devel] [PATCH win-vdagent v2 1/2] Introducing Windows CCD API

2016-08-04 Thread Sameeh Jubran
Hi Frediano, Thanks for the review. I'll fix the issues and resend the patch. Regarding “underscore uppercase” issue, I have already checked the style in other files and that's how they did it. For example in desktop_layout.h the identifier is "_H_DESKTOP_LAYOUT". On Wed, Aug 3, 2016 at 7:42 PM,