[Spice-devel] [PATCH spice-server 7/7] Move dcc_detach_stream_gracefully to dcc.[ch]

2017-11-29 Thread Jonathon Jongsma
This is a DisplayChannelClient method, so it belongs in this source file. red_upgrade_item_free() was also moved, since it is only used by this function. Signed-off-by: Jonathon Jongsma --- server/dcc.c | 82 +++ server/dcc.h | 3

[Spice-devel] [PATCH spice-server 5/7] DisplayChannel: add GSource for video stream timeouts

2017-11-29 Thread Jonathon Jongsma
Rather than handling the video stream timeouts from the RedWorker, create a separate GSource to handle these timeouts. This allows us to encapsulate the DisplayChannel functionality within display-channel.c a bit better. It also allowed us to avoid exposing display_channel_get_streams_timeout(). d

[Spice-devel] [PATCH spice-server 4/7] DisplayChannel: Use NSEC_PER_MILLISEC

2017-11-29 Thread Jonathon Jongsma
Instead of using 1000*1000 Signed-off-by: Jonathon Jongsma --- server/display-channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index 96feabc3c..1c14344be 100644 --- a/server/display-channel.c +++ b/server/displa

[Spice-devel] [PATCH spice-server 2/7] VideoStream: store channel in stream

2017-11-29 Thread Jonathon Jongsma
This allows us to unref the stream directly rather than needing to pass the associated DisplayChannel to stream_unref(). The same is also true for stream_agent_unref, since the only reason that stream_agent_unref() required a DisplayChannel parameter was to pass it to stream_unref(). This also resu

[Spice-devel] [PATCH spice-server 6/7] video_stream_detach_and_stop -> display_channel_stop_video_streams()

2017-11-29 Thread Jonathon Jongsma
Rename this function and move it to display-channel.[ch]. This function is really a DisplayChannel method, since it iterates through all of the channel's streams and detaches and stops them. Because of this change, detach_video_stream_gracefully() could also be made static and moved to display-chan

[Spice-devel] [PATCH spice-server 1/7] Rename RedStreamClipItem to VideoStreamClipItem

2017-11-29 Thread Jonathon Jongsma
Avoid confusion with RedStream which is a totally unrelated object. Signed-off-by: Jonathon Jongsma --- server/dcc-send.c | 4 ++-- server/dcc.c | 2 +- server/video-stream.c | 10 +- server/video-stream.h | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) di

[Spice-devel] [PATCH spice-server 3/7] Move stream creation/maintenance funcs to DisplayChannel

2017-11-29 Thread Jonathon Jongsma
These functions were really DisplayChannel methods but were mixed in with the VideoStream (and some DisplayChannelClient code) in video-stream.h. Putting it in the proper location helps organize the code better and allows us to make several functions static. Signed-off-by: Jonathon Jongsma --- s

[Spice-devel] [PATCH spice-server 0/7] Stream cleanups

2017-11-29 Thread Jonathon Jongsma
I sent out a similar series earlier, but it was a bit haphazard and we weren't sure if it was really worth pursuing. I hope this series is a bit more targeted and doesn't try to do too much. This series also adds a GSource for video stream timeouts, which helps encapsulate more of the video stream

[Spice-devel] [PATCH spice-server v2 2/2] Rename StreamAgent to VideoStreamAgent

2017-11-29 Thread Jonathon Jongsma
Just to avoid confusion between different uses of the word Stream (e.g. RedStream) clarify that it's related to video streams Signed-off-by: Jonathon Jongsma --- Changes in v2: - broke long lines, changed function declaration indentation server/dcc-private.h | 2 +- server/dcc-send.c

[Spice-devel] [PATCH spice-server v2 1/2] Rename Stream to VideoStream

2017-11-29 Thread Jonathon Jongsma
To prevent confusion between Stream (a video stream) and RedStream (a generic data stream between client and server), change the name to VideoStream to be more explicit about what it is. Signed-off-by: Jonathon Jongsma --- Changes in v2: - broke long lines, changed function declaration indentati

[Spice-devel] [PATCH linux vdagent] Avoid leaking fd when udscs_create_server_for_fd fails

2017-11-29 Thread Jonathon Jongsma
Reported by Frediano Ziglio. if udscs_create_server_for_fd() fails, it will return NULL and the file descriptor will be leaked. Since the calling function is the one that created the fd, it should free the fd if the server could not be created. Signed-off-by: Jonathon Jongsma --- src/udscs.c | 1

[Spice-devel] [PATCH linux vdagent] Don't install udev rules into /lib

2017-11-29 Thread Jonathon Jongsma
Ask udev (via pkg-config) for the appropriate directory to install udev rules. This is useful for recent distributions (e.g. RHEL7, fedora) that no longer have a root /lib directory and instead use /usr/lib Signed-off-by: Jonathon Jongsma --- Makefile.am | 2 +- configure.ac | 5 + 2 files

[Spice-devel] [PATCH linux vdagent] Don't install udev rules into /lib

2017-11-29 Thread Jonathon Jongsma
Ask udev (via pkg-config) for the appropriate directory to install udev rules. This is useful for recent distributions (e.g. RHEL7, fedora) that no longer have a root /lib directory and instead use /usr/lib Signed-off-by: Jonathon Jongsma --- Makefile.am | 2 +- configure.ac | 5 + 2 files

Re: [Spice-devel] [PATCH linux vdagent 2/2] Avoid leaking udscs file descriptor

2017-11-29 Thread Frediano Ziglio
> > This is a finding from coverity. In practice it has very little impact maybe Coverity (with capital) ? > since returning NULL from this function results in the process existing > with an error. > > Signed-off-by: Jonathon Jongsma > --- > src/udscs.c | 2 ++ > 1 file changed, 2 insertions

Re: [Spice-devel] Spice-server gobject bindings

2017-11-29 Thread Christophe Fergeau
Hey Matthew, I've finally taken a quick look at these bindings. For some reason I could not build it: ssg-server.c: In function 'ssg_server_class_init': ssg-server.c:630:21: error: 'SSG_TYPE_SPICE_COMPAT_VERSION_T' undeclared (first use in this function); did you mean 'SSG_TYPE_SPICE_PORT_EVENT_

[Spice-devel] [PATCH spice-server] red-channel-client: Rename item_in_pipe to item_sent

2017-11-29 Thread Frediano Ziglio
The name is more consistent with the value of the flag and the function red_channel_client_wait_pipe_item_sent where the MarkerPipeItem structure is used. Signed-off-by: Frediano Ziglio --- server/red-channel-client.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --g

[Spice-devel] [PATCH linux vdagent 2/2] Avoid leaking udscs file descriptor

2017-11-29 Thread Jonathon Jongsma
This is a finding from coverity. In practice it has very little impact since returning NULL from this function results in the process existing with an error. Signed-off-by: Jonathon Jongsma --- src/udscs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/udscs.c b/src/udscs.c index 64f

[Spice-devel] [PATCH linux vdagent 1/2] systemd: use "After" with "Requisite"

2017-11-29 Thread Jonathon Jongsma
The "Requisite" directive is intended to require that the virtio port device exists before starting the vdagent socket unit. If the device does not exist, the socket should fail to start. However, without using "After", the socket will still start even when the device is not present. See https://g

Re: [Spice-devel] [PATCH vdagent v3 1/3] vdagent: add GTK+

2017-11-29 Thread Christophe Fergeau
On Mon, Nov 13, 2017 at 06:50:05PM +0100, Jakub Janků wrote: > This is a preparatory patch for GTK+ vdagent redesign. > > Since most of the vdagent code still uses X11 lib, > force GDK to use X11 backend by calling > gdk_set_allowed_backends("x11"). What happens if the agent tries to use gtk+, an

Re: [Spice-devel] [PATCH spice-server v2] red-channel-client: Avoid weird memory references using MarkerPipeItem

2017-11-29 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 02:14:56PM +0100, Frediano Ziglio wrote: > Instead of having MarkerPipeItem pointing to an external variable with > the possibility to forget to reset it and have a dangling pointer use > reference counting to keep the item and mark the item when sent. "and have a dangling

Re: [Spice-devel] [PATCH spice-common] proto: Add some documentation to stream_report message

2017-11-29 Thread Christophe Fergeau
On Wed, Nov 29, 2017 at 06:34:52AM -0500, Frediano Ziglio wrote: > > > > On Tue, Nov 28, 2017 at 10:43:33AM +, Frediano Ziglio wrote: > > > Most of the documentation is extracted from notes in spice-server > > > code and comments. > > > > > > Signed-off-by: Frediano Ziglio > > > --- > > > s

Re: [Spice-devel] [PATCH spice-common] proto: Add some documentation to stream_report message

2017-11-29 Thread Frediano Ziglio
> > On Tue, Nov 28, 2017 at 10:43:33AM +, Frediano Ziglio wrote: > > Most of the documentation is extracted from notes in spice-server > > code and comments. > > > > Signed-off-by: Frediano Ziglio > > --- > > spice.proto | 12 > > 1 file changed, 12 insertions(+) > > > > diff

Re: [Spice-devel] [PATCH spice-common] proto: Add some documentation to stream_report message

2017-11-29 Thread Christophe Fergeau
On Tue, Nov 28, 2017 at 10:43:33AM +, Frediano Ziglio wrote: > Most of the documentation is extracted from notes in spice-server > code and comments. > > Signed-off-by: Frediano Ziglio > --- > spice.proto | 12 > 1 file changed, 12 insertions(+) > > diff --git a/spice.proto b/s

Re: [Spice-devel] [PATCH usbredir v3] usbredirserver: reject empty vendorid in cmd line

2017-11-29 Thread Frediano Ziglio
> > From: Chen Hanxiao > > Vendor ID is not a valid ID [1] > But we could pass it from cmd: > usbredirserver :abcd > Which will get a vendor ID. > >or > usbredirserver :87abcd > will get an ID > 0x > > > This patch will check this senario. > > [1]: http://www.linux-

Re: [Spice-devel] [PATCH spice-server] mjpeg-encoder: Fix some typos

2017-11-29 Thread Christophe Fergeau
Sure, Acked-by: Christophe Fergeau On Tue, Nov 28, 2017 at 11:25:09AM +, Frediano Ziglio wrote: > unexected -> unexpected > esitimation -> estimation > > Signed-off-by: Frediano Ziglio > --- > server/mjpeg-encoder.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff -