Re: [Spice-devel] [spice-gtk PATCH v2] gstaudio: set output parameter to NULL on error

2016-01-18 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Mon, 2016-01-18 at 15:09 +0100, Victor Toso wrote: > This is not really triggered in the current code but this is usually > expected in case of errors; Also, the same function on record side > already does this. > --- > src/spice-gstaudio.c | 4

Re: [Spice-devel] [PATCH 14/14] Add strings for translation

2016-01-18 Thread Jonathon Jongsma
On Mon, 2016-01-18 at 10:05 +0100, Fabiano Fidêncio wrote: > While doing the work to use GTask isntead of GSimpleAsyncResult I've > noticed a few error strings that were not marked to be translated. > I am not exactly sure if it was intentional or not, but I do believe > that our error messages sho

Re: [Spice-devel] [PATCH 15/15] reds_num_of_clients() -> reds_get_n_clients()

2016-01-18 Thread Jonathon Jongsma
On Mon, 2016-01-18 at 16:38 +, Frediano Ziglio wrote: > From: Jonathon Jongsma > > More consistent with glib naming conventions. Also make the function > static since it's not used outside of this source file. I don't know if this patch has changed slightly due to re

Re: [Spice-devel] [PATCH server v2 02/13] tests: link test-qxl-parsing with libserver

2016-01-18 Thread Jonathon Jongsma
In general, I appreciate a bit more justification in the commit log so I can quickly understand the "why" in addition to the "what". In this case, I assume it's to reduce build time and avoid compiling these files twice. ACK with a slightly expanded commit log. Acked-by

Re: [Spice-devel] [PATCH server v2 03/13] tests: make sure all tests are built on default rule

2016-01-18 Thread Jonathon Jongsma
On Fri, 2016-01-15 at 09:08 -0500, Frediano Ziglio wrote: > > > > Hi > > > > - Original Message - > > > > > > > > Hi > > > > > > > > On Fri, Jan 15, 2016 at 11:50 AM, Frediano Ziglio > > > > wrote: > > > > > > > > > > > Subject: [PATCH server v2 03/13] tests: make sure all tests are >

Re: [Spice-devel] [PATCH server v2 05/13] red-channel: send marshaller message fd

2016-01-18 Thread Jonathon Jongsma
Maybe it's just me, but I don't really understand the purpose of this patch. Can you give a big-picture explanation? On Thu, 2016-01-14 at 22:01 +0100, Marc-André Lureau wrote: > From: Marc-André Lureau > > Send the fd associated to the last message sent. > > Even if the fd is invalid, the s

Re: [Spice-devel] [PATCH 14/14] Add strings for translation

2016-01-19 Thread Jonathon Jongsma
On Tue, 2016-01-19 at 09:59 +0100, Christophe Fergeau wrote: > On Mon, Jan 18, 2016 at 02:41:42PM -0600, Jonathon Jongsma wrote: > > On Mon, 2016-01-18 at 10:05 +0100, Fabiano Fidêncio wrote: > > > @@ -995,7 +997,7 @@ static void complete_task(SpicePulse *pulse, struct >

Re: [Spice-devel] [PATCH v2] channel: do not free rcc->stream in red_channel_client_disconnect

2016-01-19 Thread Jonathon Jongsma
el_client_disconnect s/the// > would cause rcc->stream to be NULL which will turn in a use-after-free s/turn in/result in/ > problem (stream in red_peer_handle_incoming will use cached stream value). ACK with above changes Acked-by: Jonathon Jongsma > > Signed-off-by: Marc-Andr

Re: [Spice-devel] [PATCH 02/15] Change vdi_port_read_buf_process() to take RedsState arg

2016-01-19 Thread Jonathon Jongsma
On Tue, 2016-01-19 at 12:03 +0100, Pavel Grunt wrote: > On Tue, 2016-01-19 at 05:12 -0500, Frediano Ziglio wrote: > > > > > > Hi, > > > > > > On Mon, 2016-01-18 at 16:37 +, Frediano Ziglio wrote: > > > > From: Jonathon Jongs

Re: [Spice-devel] [PATCH] tests: add explanation for test_qxl_pasring_SOURCES

2016-01-19 Thread Jonathon Jongsma
hy is this important? > > test_qxl_parsing_SOURCES = \ > > test-qxl-parsing.c \ > > ../red-parse-qxl.c \ > > -- > > 2.4.3 > > > > > ___ > Spice-devel mailing list > Spice-de

Re: [Spice-devel] [PATCH v4 0/5] Event loop improves

2016-01-19 Thread Jonathon Jongsma
On Tue, 2016-01-19 at 11:54 +, Frediano Ziglio wrote: > These set of patches try to improve current event loop code. > > Patches improve test event loop, make a template from > them and use for main loop. > These patches also improve glib main loop patch from Marc and > supercede fixes for tim

Re: [Spice-devel] [PATCH v4 4/5] tests: test removed triggered timers are not called

2016-01-19 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Tue, 2016-01-19 at 11:54 +, Frediano Ziglio wrote: > This could happen for instance if a given timer remove all clients > which have associated timers. > > Signed-off-by: Frediano Ziglio > --- > server/tests/test-loop.c | 21 +

Re: [Spice-devel] [PATCH v4 2/5] tests: extract code for event loop

2016-01-19 Thread Jonathon Jongsma
Too bad the other method didn't work, as I much preferred it. But oh well.. Acked-by: Jonathon Jongsma On Tue, 2016-01-19 at 11:54 +, Frediano Ziglio wrote: > This code will be reused for main loop > > Signed-off-by: Frediano Ziglio > --- > server/Makefile.a

Re: [Spice-devel] [PATCH 1/2] usb-device-widget: Improve "there are no free USB channnels" string

2016-01-20 Thread Jonathon Jongsma
On Wed, 2016-01-20 at 10:09 +0100, Fabiano Fidêncio wrote: > On Wed, Jan 20, 2016 at 9:53 AM, Victor Toso wrote: > > Hi, > > > > On Tue, Jan 19, 2016 at 10:36:37PM +0100, Fabiano Fidêncio wrote: > > > As the message can be understand as an error message, let's replace it > > > for a more user-fri

Re: [Spice-devel] [PATCH] tests: add explanation for test_qxl_pasring_SOURCES

2016-01-20 Thread Jonathon Jongsma
importance of this is quite an opinion. OK, fair point. I'm OK with that. Can you change the commit log to something like: "to ensure that they don't depend on any other files" Acked-by: Jonathon Jongsma > > Frediano > > > > > > > > > &

Re: [Spice-devel] [PATCH 2/2] usb-device-widget: Add counter of free channels

2016-01-20 Thread Jonathon Jongsma
On Wed, 2016-01-20 at 10:11 +0100, Fabiano Fidêncio wrote: > On Wed, Jan 20, 2016 at 9:59 AM, Victor Toso wrote: > > Hi, > > > > On Tue, Jan 19, 2016 at 10:36:38PM +0100, Fabiano Fidêncio wrote: > > > As the message showed when the last usbredir channel is taken can be a > > > bit confusing, let'

Re: [Spice-devel] [PATCH 08/14] spice-pulse: Use GTask instead of GSimpleAsyncResult

2016-01-20 Thread Jonathon Jongsma
On Wed, 2016-01-20 at 16:21 +0100, Christophe Fergeau wrote: > On Wed, Jan 20, 2016 at 04:09:44PM +0100, Fabiano Fidêncio wrote: > > > > static void spice_pulse_complete_async_task(struct async_task *task, > > > > const gchar *err_msg) > > > > @@ -1157,19 +1143,13 @@ static void > > > > pulse_stre

Re: [Spice-devel] [PATCH 0/3] Glib loop in RedWorker

2016-01-20 Thread Jonathon Jongsma
On Wed, 2016-01-20 at 16:32 +, Frediano Ziglio wrote: > Finally is time to approach again these patches to use GLib loop > functions for RedWorker. > Patches has been through so many passages that I'm posting as they > are. > > Frediano Ziglio (1): > worker: use glib main loop > > Marc-Andr

Re: [Spice-devel] [PATCH 1/3] worker: use glib main loop

2016-01-20 Thread Jonathon Jongsma
> > > Signed-off-by: Marc-André Lureau > > Signed-off-by: Jonathon Jongsma > > Signed-off-by: Frediano Ziglio > > --- > > server/Makefile.am | 2 - > > server/red-worker.c| 252 +- > >

Re: [Spice-devel] [PATCH 3/3] worker: avoid server hanging when no client are connected.

2016-01-20 Thread Jonathon Jongsma
On Wed, 2016-01-20 at 11:46 -0500, Frediano Ziglio wrote: > > > > From: Marc-André Lureau > > > > --- > > server/red-worker.c | 27 ++- > > 1 file changed, 18 insertions(+), 9 deletions(-) > > > > diff --git a/server/red-worker.c b/server/red-worker.c > > index a98c4a6.

Re: [Spice-devel] [PATCH 0/3] Glib loop in RedWorker

2016-01-21 Thread Jonathon Jongsma
hmm, I could have sworn I had pulled git master before I sent this email, but maybe I didn't... On Thu, 2016-01-21 at 09:10 +0100, Pavel Grunt wrote: > Hi, > > On Wed, 2016-01-20 at 16:55 -0600, Jonathon Jongsma wrote: > > On Wed, 2016-01-20 at 16:32 +, Frediano Ziglio

[Spice-devel] [PATCH] Replay: report error if we don't read the correct file header

2016-01-21 Thread Jonathon Jongsma
The replay file should start with a header such as SPICE_REPLAY 1 Instead of soldiering on if we don't encounter this header, print a warning, and also assert that spice_replay_new() returned a non-NULL object. --- server/red-replay-qxl.c | 3 +++ server/tests/replay.c | 1 + 2 files changed,

Re: [Spice-devel] [PATCH] Replay: report error if we don't read the correct file header

2016-01-21 Thread Jonathon Jongsma
On Thu, 2016-01-21 at 11:48 -0500, Frediano Ziglio wrote: > > > > The replay file should start with a header such as > > SPICE_REPLAY 1 > > > > Instead of soldiering on if we don't encounter this header, print a > > warning, and also assert that spice_replay_new() returned a non-NULL > > object

[Spice-devel] [PATCH v2] Replay: report error if we don't read the correct file header

2016-01-21 Thread Jonathon Jongsma
The replay file should start with a header such as SPICE_REPLAY 1 Instead of soldiering on if we don't encounter this header, print a warning and return NULL. Also exit with a failure if spice_replay_new() returns a NULL object in main. --- server/red-replay-qxl.c | 3 +++ server/tests/replay.

Re: [Spice-devel] [PATCH v2] Replay: report error if we don't read the correct file header

2016-01-21 Thread Jonathon Jongsma
On Thu, 2016-01-21 at 11:15 -0600, Jonathon Jongsma wrote: > The replay file should start with a header such as > SPICE_REPLAY 1 > > Instead of soldiering on if we don't encounter this header, print a > warning and return NULL. Also exit with a failure if spice_replay_ne

[Spice-devel] [PATCH v3] Replay: report error if we don't read the correct file header

2016-01-21 Thread Jonathon Jongsma
The replay file should start with a header such as SPICE_REPLAY 1 Instead of soldiering on if we don't encounter this header, print a warning and return NULL. Also exit with a failure if spice_replay_new() returns a NULL object in main. --- server/red-replay-qxl.c | 3 +++ server/tests/replay.

Re: [Spice-devel] [PATCH v2 1/2] usb-device-{manager, widget}: Add counter of free channels

2016-01-21 Thread Jonathon Jongsma
device); > } > + > +g_object_get(priv->manager, "free-channels", &free_channels, NULL); > +str = g_strdup_printf(_("Select USB devices to redirect (%d channels > free)"), > + free_channels); > +markup_str = g_strdup_printf("%s", str); > +gtk_label_set_markup(GTK_LABEL (priv->label), markup_str); > +g_free(markup_str); > +g_free(str); > + > spice_usb_device_widget_update_status(self); Here we're basically duplicating what you did in the constructor. What about moving this into the spice_usb_device_widget_update_status() function so that it's not duplicated? > } > Reviewed-by: Jonathon Jongsma ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH v2 2/2] usb-device-{manager, widget}: Remove misleading message when there are no channels to redirect

2016-01-21 Thread Jonathon Jongsma
if (!can_redirect) { > @@ -402,6 +407,7 @@ static void check_can_redirect(GtkWidget *widget, gpointer > user_data) > } > } > > +end: > g_clear_error(&err); > } > As a downstream patch, I think this is perfectly fine. I'm not convinced that we should commit it upstream though. What do you think? Reviewed-by: Jonathon Jongsma ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [RFC^2 PATCH] implement no pushing on RedWorker

2016-01-21 Thread Jonathon Jongsma
I like the idea in general. As you said, it does result in more loop executions, but presumably it does less in each loop iteration, so I'm not sure whether that's actually a useful stat or not. For example, this patch reduces the percentage of times that we exceed the max pipe size of the channel

Re: [Spice-devel] [RFC PATCH] worker: remove dependencies from red-worker.h

2016-01-22 Thread Jonathon Jongsma
In general, it sounds like good stuff, but can we wait with this stuff until after we finish merging the refactory branch? I haven't looked in detail, but it seems to me that at least some of this stuff is already handled in the refactory branch (for instance, there is a common-worker-channel.[ch]

Re: [Spice-devel] Loop, glib and spice-server

2016-01-26 Thread Jonathon Jongsma
Just a few initial comments, questions, below On Mon, 2016-01-25 at 07:35 -0500, Frediano Ziglio wrote: > Hi, > I spent quite some time trying to understand the main loop of spice-server. > (Perhaps I'm tired of rebasing the glib loop patches after 250 patches!) > > There were quite some questi

Re: [Spice-devel] [PATCH] remove wrong statement terminator from preprocessor macro

2016-01-26 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Tue, 2016-01-26 at 16:36 +, Frediano Ziglio wrote: > Actually not causing problems as when used is always followed by another > terminator but better to fix the definition. > > Signed-off-by: Frediano Ziglio > --- > common/lz_compress_tmpl.

Re: [Spice-devel] [PATCH] small spice_strdup optimization

2016-01-26 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Tue, 2016-01-26 at 16:36 +, Frediano Ziglio wrote: > avoid to compute the string length twice and use memcpy instead of > strcpy which is faster not having to check for terminator. > > Signed-off-by: Frediano Ziglio > --- > common/mem

Re: [Spice-devel] Loop, glib and spice-server

2016-01-26 Thread Jonathon Jongsma
On Tue, 2016-01-26 at 11:14 -0500, Frediano Ziglio wrote: > > > > Hi, > > I spent quite some time trying to understand the main loop of spice > > -server. > > (Perhaps I'm tired of rebasing the glib loop patches after 250 patches!) > > > > There were quite some questions on the loop and the pat

[Spice-devel] [PATCH v2] qxl: inline documentation for get_command and req_cmd_notification

2016-01-26 Thread Jonathon Jongsma
From: Frediano Ziglio Signed-off-by: Frediano Ziglio Signed-off-by: Jonathon Jongsma --- Good idea. Here's a proposed re-wording of the documentation. Changes: - for get_command(), I changed the verb from 'request' to 'retrieve' to make it (I think) a bit mor

[Spice-devel] [PATCH v3] qxl: inline documentation for get_command and req_cmd_notification

2016-01-26 Thread Jonathon Jongsma
From: Frediano Ziglio Signed-off-by: Frediano Ziglio Signed-off-by: Jonathon Jongsma --- Changes: - add some newlines - fix documentation for return of get_command server/spice-qxl.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/server/spice-qxl.h b/server/spice-qxl.h

Re: [Spice-devel] [PATCH v3] qxl: inline documentation for get_command and req_cmd_notification

2016-01-27 Thread Jonathon Jongsma
On Wed, 2016-01-27 at 06:52 -0500, Frediano Ziglio wrote: > > > > From: Frediano Ziglio > > > > Signed-off-by: Frediano Ziglio > > Signed-off-by: Jonathon Jongsma > > --- > > > > Changes: > > - add some newlines > > - fix document

Re: [Spice-devel] [PATCH 06/15] Remove use of global 'reds' var from spice_server_remove_interface()

2016-01-27 Thread Jonathon Jongsma
; > > From: Jonathon Jongsma > > > > Since this is public API, we can't easily change the signature of the > > function to take a RedsState argument, so instead we apply a hack and > > store the reds argument inside the device state struct when the > > interfac

Re: [Spice-devel] Loop, glib and spice-server

2016-01-27 Thread Jonathon Jongsma
On Wed, 2016-01-27 at 06:49 -0500, Frediano Ziglio wrote: > > > > On Tue, 2016-01-26 at 11:14 -0500, Frediano Ziglio wrote: > > > > > > > > Hi, > > > > I spent quite some time trying to understand the main loop of spice > > > > -server. > > > > (Perhaps I'm tired of rebasing the glib loop patch

Re: [Spice-devel] [PATCH 4/5] Avoid to call ceil_log_2 twice with same value

2016-01-27 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Wed, 2016-01-27 at 16:09 +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > common/quic.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/common/quic.c b/common/quic.c > index 0e6c948..a32a530

Re: [Spice-devel] [PATCH 2/5] zeroLUT has same content of lzeroes

2016-01-27 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Wed, 2016-01-27 at 16:09 +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > common/quic.c | 27 ++- > 1 file changed, 2 insertions(+), 25 deletions(-) > > diff --git a/common/quic.c b/common/quic

Re: [Spice-devel] [PATCH 1/5] common: constify some declarations

2016-01-27 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Wed, 2016-01-27 at 16:09 +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > common/log.c| 2 +- > common/marshaller.c | 7 +-- > common/marshaller.h | 2 +- > 3 files changed, 7 insertions(+), 4 deletions(-) >

Re: [Spice-devel] [PATCH 3/5] Constification

2016-01-27 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Wed, 2016-01-27 at 16:09 +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > common/quic.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/common/quic.c b/common/quic.c > index 0c5fc1c..0e6c948

Re: [Spice-devel] [PATCH 5/5] Use code to compute a bit mask

2016-01-27 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Wed, 2016-01-27 at 16:09 +, Frediano Ziglio wrote: > Code is in the slow path, this reduce space needed for data+code. > > Signed-off-by: Frediano Ziglio > --- > common/quic.c | 13 ++--- > 1 file changed, 2 insertions(+), 11 dele

Re: [Spice-devel] [PATCH 1/2] replay: better record encapsulation

2016-01-27 Thread Jonathon Jongsma
Nice. I think I would prefer a slightly different approach. In essence: - SpiceRecord definition should be in the .c file and only typedef in the header - functions should be named spice_record_*() instead of red_record_*()? - red_worker_new() should continue handling the environment variable to d

Re: [Spice-devel] [PATCH] worker: do not leak cursor after disconnecting clients

2016-01-27 Thread Jonathon Jongsma
nnect_all_display_TODO_remove_me(red_channel); } else { sleep_count++; usleep(DISPLAY_CLIENT_RETRY_INTERVAL); } _TODO_remove_me()... Anyway, Frediano's patch looks correct. Acked-by: Jonathon Jongsma

Re: [Spice-devel] [PATCH v2 5/9] worker: remove useless test

2016-01-27 Thread Jonathon Jongsma
Sure, why not? Acked-by: Jonathon Jongsma On Tue, 2016-01-26 at 09:44 +, Frediano Ziglio wrote: > red_channel_max_pipe_size returns 0 if no client (channel disconnected) > no need to check if cursor_channel/display_channel are NULL or > connected. > > Signed-off-by:

Re: [Spice-devel] [PATCH v2 6/9] worker: remove useless check

2016-01-27 Thread Jonathon Jongsma
OK Acked-by: Jonathon Jongsma On Tue, 2016-01-26 at 09:44 +, Frediano Ziglio wrote: > display_channel is never NULL. > > Signed-off-by: Frediano Ziglio > --- > server/red-worker.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/serv

Re: [Spice-devel] [PATCH v2 7/9] worker: unify flush_cursor_commands and flush_display_commands

2016-01-27 Thread Jonathon Jongsma
On Tue, 2016-01-26 at 14:51 +0100, Pavel Grunt wrote: > On Tue, 2016-01-26 at 09:44 +, Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio > > --- > > server/red-worker.c | 68 ++- > > -- > > 1 file changed, 23 insertions(+), 45 deletions(

Re: [Spice-devel] [PATCH 01/16] worker: use glib main loop

2016-01-28 Thread Jonathon Jongsma
I've looked at this patch so many times now that it's hard to review it objectively anymore ;) But it looks good to me. I think we still want the follow-up patch that removes the pushing after this goes in, though. Acked-by: Jonathon Jongsma On Wed, 2016-01-27 at 12:48 +, Fredi

Re: [Spice-devel] [PATCH] worker: unify flush_cursor_commands and flush_display_commands

2016-01-28 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Thu, 2016-01-28 at 16:15 +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/red-worker.c | 75 +++- > - > 1 file changed, 26 insertions(+), 49 deletions(-) > > di

Re: [Spice-devel] [PATCH v6 01/10] Simplify spice_usb_device_equal_libdev()

2016-01-28 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Thu, 2015-10-29 at 17:26 +0200, Dmitry Fleytman wrote: > From: Christophe Fergeau > > The Windows-specific version duplicates some code from > spice_usb_device_manager_libdev_match(), this commit > switches to using that helper instead. > ---

Re: [Spice-devel] [PATCH v6 02/10] Simplify spice_usb_device_manager_device_to_libdev()

2016-01-28 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Thu, 2015-10-29 at 17:26 +0200, Dmitry Fleytman wrote: > From: Christophe Fergeau > > The Windows-specific version duplicates some code from > spice_usb_device_equal_libdev(), this commit > switches to using that helper instead. > --- > src

Re: [Spice-devel] [PATCH v6 04/10] win-usbredir: Move installer interaction logic to separate functions

2016-01-28 Thread Jonathon Jongsma
On Thu, 2015-10-29 at 17:26 +0200, Dmitry Fleytman wrote: > Signed-off-by: Dmitry Fleytman > --- > spice-common | 2 +- > src/usb-device-manager.c | 108 -- > - > 2 files changed, 66 insertions(+), 44 deletions(-) > > diff --git a/spice-c

Re: [Spice-devel] [PATCH v2 1/3] replay: better record encapsulation

2016-01-29 Thread Jonathon Jongsma
d = red_record_new(); > dispatcher = red_dispatcher_get_dispatcher(red_dispatcher); > dispatcher_set_opaque(dispatcher, worker); > > worker->red_dispatcher = red_dispatcher; > worker->qxl = qxl; > register_callbacks(dispatcher); > -if (worker-&g

Re: [Spice-devel] [PATCH v2 2/3] replay: use spice_record_ as prefix instead of red_record_

2016-01-29 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Fri, 2016-01-29 at 13:28 +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/red-record-qxl.c | 14 +++--- > server/red-record-qxl.h | 12 ++-- > server/red-worker.c | 12 ++-- > 3 files chan

Re: [Spice-devel] [PATCH spice] build-sys: Require glib2 >= 2.36

2016-01-29 Thread Jonathon Jongsma
SION"]) > > PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.7) > AC_SUBST(PIXMAN_CFLAGS) As far as I remember, when discussing the newest glib version for virt-viewer, we decided that 2.38 was the newest one we should require at the moment. So 2.36 should be fine. Acked-by: Jonath

Re: [Spice-devel] [PATCH v2 1/3] replay: better record encapsulation

2016-01-29 Thread Jonathon Jongsma
> specified), would it be better to name it something like > > red_record_try_new()? > > Maybe that's unnecessary and annoying. > > > > It costs mainly nothing, I can go with _try_new. > > > Also, I still think that squashing the following patch into thi

Re: [Spice-devel] [PATCH v6 06/10] win-usbredir: Introduce use_usbclerk flag

2016-01-29 Thread Jonathon Jongsma
I personally don't think it's very useful to introduce a variable without actually using it anywhere. I'd prefer to combine it with the next commit. Reviewed-by: Jonathon Jongsma On Thu, 2015-10-29 at 17:26 +0200, Dmitry Fleytman wrote: > This flag will be used by future c

Re: [Spice-devel] [PATCH 05/18] Store 'renderers' as GArray in RedsState

2016-02-02 Thread Jonathon Jongsma
On Mon, 2016-02-01 at 08:47 -0500, Frediano Ziglio wrote: > > > > From: Jonathon Jongsma > > > > Acked-by: Frediano Ziglio > > --- > > server/display-channel.c | 13 +++-- > > server/display-channel.h | 3 +-- > > server/reds-privat

Re: [Spice-devel] [PATCH 07/16] Remove use of global 'reds' var from spice_server_remove_interface()

2016-02-02 Thread Jonathon Jongsma
On Fri, 2016-01-29 at 11:31 +0100, Pavel Grunt wrote: > On Wed, 2016-01-27 at 12:48 +, Frediano Ziglio wrote: > > From: Jonathon Jongsma > > > > Since this is public API, we can't easily change the signature of the > > function to take a RedsState argument

Re: [Spice-devel] [PATCH 1/4] worker: push data when clients can receive them

2016-02-02 Thread Jonathon Jongsma
_push(RED_CHANNEL(worker->cursor_channel)); > -} > -if (worker->display_channel) { > -red_channel_push(RED_CHANNEL(worker->display_channel)); > -} > -} > - > static void red_disconnect_display(RedWorker *worker) > { > spice_warning("update timeout"); > @@ -1458,9 +1448,6 @@ static gboolean worker_source_dispatch(GSource *source, > GSourceFunc callback, > red_process_cursor(worker, &ring_is_empty); > red_process_display(worker, &ring_is_empty); > > -/* TODO: remove me? that should be handled by watch out condition */ > -red_push(worker); > - > return TRUE; > } > Reviewed-by: Jonathon Jongsma ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH 2/4] replay: remove a message that could be caused by a race condition

2016-02-02 Thread Jonathon Jongsma
-g_printerr("id: %d, queue length: %d", > - g_source_get_id(fill_source), > g_async_queue_length(aqueue)); > - > return TRUE; > } > Reviewed-by: Jonathon Jongsma ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [PATCH v2] Move ticketing_enabled to RedsState struct

2016-02-02 Thread Jonathon Jongsma
Removing more global variables --- v2: - use gboolean type instead of int server/reds-private.h | 1 + server/reds.c | 10 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/server/reds-private.h b/server/reds-private.h index bc790e8..504cb27 100644 --- a/server

Re: [Spice-devel] [PATCH 3/4] worker: avoid blocking loop

2016-02-02 Thread Jonathon Jongsma
Ack with minor changes below Acked-by: Jonathon Jongsma On Fri, 2016-01-29 at 10:53 +, Frediano Ziglio wrote: > Make sure we process commands after we can send data to client. > If during processing we detected that there was too data in the clients too much data > queues the p

Re: [Spice-devel] [PATCH 4/4] worker: don't do too much polling

2016-02-03 Thread Jonathon Jongsma
OK Acked-by: Jonathon Jongsma On Fri, 2016-01-29 at 10:53 +, Frediano Ziglio wrote: > Now that processing is correctly restored there is no need to keep > polling to avoid main loop hangs. Reduce the polling count to 1 > (just try once). > This reduce cpu usage if guests are

Re: [Spice-devel] [PATCH v2 1/4] worker: push data when clients can receive them

2016-02-03 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Wed, 2016-02-03 at 10:48 +, Frediano Ziglio wrote: > During every iteration of the main worker loop, outgoing data was pushed to > the client. However, there was no guarantee that the loop would be woken up > in every situation. So there were some c

Re: [Spice-devel] [PATCH v2 2/4] replay: remove a message that could be caused by a race condition

2016-02-03 Thread Jonathon Jongsma
this request can happen. > Avoid printing any message on this condition, message will be appended > and loop woken up when replay code can do it. > > Signed-by: Frediano Ziglio Ack with change above Acked-by: Jonathon Jongsma > --- > server/tests/replay.c | 6 -- > 1 f

Re: [Spice-devel] [PATCH v2 3/4] worker: avoid blocking loop

2016-02-03 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Wed, 2016-02-03 at 10:48 +, Frediano Ziglio wrote: > Make sure we process commands after we can send data to client. > If during processing we detected that there was too much data in the > clients queues the processing of commands just stop till

Re: [Spice-devel] [PATCH v2 4/4] worker: don't do too much polling

2016-02-03 Thread Jonathon Jongsma
Just acked the previous version before I noticed this new patchset. Acked-by: Jonathon Jongsma On Wed, 2016-02-03 at 10:48 +, Frediano Ziglio wrote: > Now that processing is correctly restored there is no need to keep > polling to avoid main loop hangs. Reduce the polling coun

Re: [Spice-devel] [PATCH 06/18] Move streaming_video to RedsState struct

2016-02-03 Thread Jonathon Jongsma
On Wed, 2016-02-03 at 10:08 +0100, Pavel Grunt wrote: > On Tue, 2016-02-02 at 16:05 +, Frediano Ziglio wrote: > > From: Jonathon Jongsma > > > > Also requires adding reds_get_streaming_video() accessor so that > > other > > files can check this value. > &g

[Spice-devel] [PATCH v2] Move agent_mouse to RedsState struct

2016-02-03 Thread Jonathon Jongsma
Required adding a RedsState arg to reds_get_agent_mouse() --- server/inputs-channel.c | 8 server/reds-private.h | 2 ++ server/reds.c | 10 +- server/reds.h | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/server/inputs-channel.c b

[Spice-devel] [PATCH v2] Move streaming_video to RedsState struct

2016-02-03 Thread Jonathon Jongsma
Also requires adding reds_get_streaming_video() accessor so that other files can check this value. --- - Changed back to assert server/red-dispatcher.c | 7 --- server/red-worker.c | 2 +- server/reds-private.h | 1 + server/reds.c | 9 +++-- server/reds.h | 2

Re: [Spice-devel] [PATCH v6 05/10] win-usbredir: Introduce UsbDk wrapper

2016-02-04 Thread Jonathon Jongsma
ICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with this library; if not, see <http://www.gnu.org/licenses/ > >. > + > + Authors: > +Dmitry Fleytman > +Kirill Moizik > +*/ > +#ifndef USBDK_HEADER > +#define USBDK_HEADER > + > +typedef struct tag_usbdk_api_wrapper usbdk_api_wrapper; > + > +BOOL usbdk_is_driver_installed(void); > +HANDLE usbdk_create_hider_handle(usbdk_api_wrapper *usbdk_api); > +BOOL usbdk_clear_hide_rules(usbdk_api_wrapper *usbdk_api, HANDLE > hider_handle); > +void usbdk_close_hider_handle(usbdk_api_wrapper *usbdk_api, HANDLE > hider_handle); > +BOOL usbdk_api_load(usbdk_api_wrapper **usbdk_api); > +void usbdk_api_unload(usbdk_api_wrapper *usbdk_api); > +void usbdk_api_set_hide_rules(usbdk_api_wrapper *usbdk_api, HANDLE > hider_handle, gchar *redirect_on_connect); Can this declaration be moved up with the other hider-related functions? > +#endif Reviewed-by: Jonathon Jongsma ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH v6 03/10] Add SpiceUsbDeviceManager parameter to device comparison functions

2016-02-04 Thread Jonathon Jongsma
It doesn't seem that these new parameters are used until patch #7, unless I missed something. So I'd re-order the patch series so that this comes right before it's used (or even merge them together?). Acked-by: Jonathon Jongsma On Thu, 2015-10-29 at 17:26 +0200, Dmitry Fleytma

Re: [Spice-devel] [PATCH v6 07/10] win-usbredir: Only match USB devices by VID:PID when WinUsb used

2016-02-04 Thread Jonathon Jongsma
> +if (manager->priv->use_usbclerk) { > +busnum = spice_usb_device_get_vid(device); > +devaddr = spice_usb_device_get_pid(device); > +} else { > +busnum = spice_usb_device_get_busnum(device); > +devaddr = spice_usb_device_get_devaddr(devi

Re: [Spice-devel] [PATCH v6 08/10] usbdk: Load hide rules for auto-redirected devices

2016-02-04 Thread Jonathon Jongsma
e_rules(priv->usbdk_api, > + priv->usbdk_hider_handle, > + priv->redirect_on_connect); > +} > + > +static > +void _usbdk_autoredir_disable(SpiceUsbDeviceManager *manager) > +{ > + Spice

Re: [Spice-devel] [PATCH v6 08/10] usbdk: Load hide rules for auto-redirected devices

2016-02-05 Thread Jonathon Jongsma
On Thu, 2016-02-04 at 16:40 -0600, Jonathon Jongsma wrote: > On Thu, 2015-10-29 at 17:26 +0200, Dmitry Fleytman wrote: > > Hide rules order UsbDk to avoid showing specific USB > > devices to Windows PnP manager. > > > > Spice-gtk loads hide rules for devices that

Re: [Spice-devel] [PATCH v6 09/10] win-usbredir: Do not use UsbClerk for non-WinUsb backends

2016-02-05 Thread Jonathon Jongsma
er_data); > +return; > +} > +#endif > + > _spice_usb_device_manager_connect_device_async(self, > device, > cancellable, > callback, >

Re: [Spice-devel] [PATCH v6 08/10] usbdk: Load hide rules for auto-redirected devices

2016-02-05 Thread Jonathon Jongsma
On Fri, 2016-02-05 at 10:21 -0600, Jonathon Jongsma wrote: > On Thu, 2016-02-04 at 16:40 -0600, Jonathon Jongsma wrote: > > On Thu, 2015-10-29 at 17:26 +0200, Dmitry Fleytman wrote: > > > Hide rules order UsbDk to avoid showing specific USB > > > devices to Windows PnP

Re: [Spice-devel] [PATCH v6 10/10] win-usbredir: Use UsbDk backend when available

2016-02-05 Thread Jonathon Jongsma
elf); > + > +usbdk_api_unload(priv->usbdk_api); Since loading the API can fail, i think it would be better to check if priv ->usbdk_api is non-NULL before unloading it. > } > #endif > /* Chain up to the parent class */ Reviewed-by: Jonathon Jongsma __

Re: [Spice-devel] [PATCH v5 02/13] win-usb-dev: Track device redirection operations in progress

2016-02-08 Thread Jonathon Jongsma
ean("redirecting", "Redirecting", > + "USB redirection operation is in progress", > + FALSE, > + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); > + > +g_object_class_inst

Re: [Spice-devel] [PATCH v5 03/13] GUdevClient: Do not process USB hotplug events while redirection is in progress

2016-02-08 Thread Jonathon Jongsma
e there was an added device and a removed device, the total number of devices is the same, and it matches the length of the cached device list. Therefore, no signal is emitted. But we should emit one remove signal and one add signal. Maybe this scenario is not a realistic possibility, I don't know. Reviewed-by: Jonathon Jongsma ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH v5 01/13] Usbredir channel: Introduce mutex for USB redirection

2016-02-09 Thread Jonathon Jongsma
PICE_IS_USBREDIR_CHANNEL(channel)); > + g_mutex_unlock(channel->priv->flows_mutex); > +} > + > static void usbredir_lock_lock(void *user_data) { > GMutex *mutex = user_data; > The code itself looks fine, but again, i

Re: [Spice-devel] [PATCH v5 04/13] usbredir: Protect data accessed by asynchronous redirection flows

2016-02-09 Thread Jonathon Jongsma
break; > +} > +spice_usbredir_channel_unlock(channel); > } > if (i == priv->channels->len) { > g_set_error_literal(err, SPICE_CLIENT_ERROR, > SPICE_CLIENT_ERROR_FAILED, I suspect that you were probably

Re: [Spice-devel] [PATCH v5 05/13] usbredir: Spawn a different thread for device redirection flow

2016-02-09 Thread Jonathon Jongsma
gt; -libusb_unref_device(priv->device); > -priv->device = NULL; > -g_boxed_free(spice_usb_device_get_type(), priv->spice_device); > -priv->spice_device = NULL; > -} > +g_simple_async_result_run_in_thread(result, &g

Re: [Spice-devel] [PATCH 06/18] Add RedsState arg to reds_init_client_[ssl_]connection()

2016-02-10 Thread Jonathon Jongsma
On Tue, 2016-02-09 at 05:43 -0500, Frediano Ziglio wrote: > > > > From: Jonathon Jongsma > > > > --- > > server/reds.c | 13 +++-- > > 1 file changed, 7 insertions(+), 6 deletions(-) > > > > diff --git a/server/reds.c b/server/reds.c &g

Re: [Spice-devel] [PATCH 06/18] Add RedsState arg to reds_init_client_[ssl_]connection()

2016-02-10 Thread Jonathon Jongsma
On Wed, 2016-02-10 at 12:35 -0500, Frediano Ziglio wrote: > > > > On Tue, 2016-02-09 at 05:43 -0500, Frediano Ziglio wrote: > > > > > > > > From: Jonathon Jongsma > > > > > > > > --- > > > > server/reds.c

Re: [Spice-devel] [PATCH 05/18] Store 'renderers' as GArray in RedsState

2016-02-10 Thread Jonathon Jongsma
On Wed, 2016-02-10 at 06:17 -0500, Frediano Ziglio wrote: > > > > On Mon, 2016-02-01 at 08:47 -0500, Frediano Ziglio wrote: > > > > > > > > From: Jonathon Jongsma > > > > > > > > Acked-by: Frediano Ziglio > > > > --- >

Re: [Spice-devel] [PATCH v5 06/13] UsbDeviceManager: Track device redirection operations in progress

2016-02-10 Thread Jonathon Jongsma
gt; * spice_usb_device_manager_connect_device_finish: > * @self: a #SpiceUsbDeviceManager. > @@ -1630,6 +1657,22 @@ gboolean > spice_usb_device_manager_connect_device_finish( > return TRUE; > } > > +#ifdef USE_USBREDIR > +static > +void _connect_device_async_

Re: [Spice-devel] [PATCH v5 07/13] UsbDeviceManager: Implement asynchronous disconnect device flow

2016-02-10 Thread Jonathon Jongsma
ointer user_data); > + > +void spice_usb_device_manager_disconnect_device_async( > + SpiceUsbDeviceManager *manager, > + SpiceUsbDevice *device, > + GCancellable *cancellable, > + GAsyncReadyCallback callback, > + gpointer user_data); > + > gboolean spice_usb_device_manager_connect_device_finish( > SpiceUsbDeviceManager *self, GAsyncResult *res, GError **err); > Reviewed-by: Jonathon Jongsma ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH v5 08/13] UsbDeviceManager: Track device disconnection operations in progress

2016-02-10 Thread Jonathon Jongsma
l > > SpiceUsbredirChannel *channel; > > +_set_redirecting(self, TRUE); > + > channel = spice_usb_device_manager_get_channel_for_dev(self, device); > nested = g_simple_async_result_new(G_OBJECT(self), callback, user_data, > > spice_usb_device_manager_disco

Re: [Spice-devel] [PATCH v5 09/13] usbredir: Disconnect USB device asynchronously

2016-02-10 Thread Jonathon Jongsma
nnect_device_async; > spice_usb_device_manager_connect_device_finish; > spice_usb_device_manager_disconnect_device; > +spice_usb_device_manager_disconnect_device_async; This should be moved to the patch which introduces this function. > spice_usb_device_manager_get; > spice_usb_device_manager_get_devices; > spice_usb_device_manager_get_devices_with_filter; Reviewed-by: Jonathon Jongsma ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH v5 10/13] UsbDeviceWidget: Show info bar during redirection flows

2016-02-10 Thread Jonathon Jongsma
nfo_bar(self, _("Redirecting USB > Device..."), > + GTK_MESSAGE_INFO, > + GTK_STOCK_DIALOG_INFO); > +} This will potentially overwrite any info bars that we just showed, such as error messagese. I think it would probably be better to put this case into the 'else' clause a few lines above where priv->err_msg is NULL. > return FALSE; > } > Reviewed-by: Jonathon Jongsma ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH v5 11/13] UsbDeviceWidget: Consider asynchronous redirection flows

2016-02-10 Thread Jonathon Jongsma
date_status(gpointer user_data) > @@ -458,9 +460,9 @@ static void connect_cb(GObject *gobject, GAsyncResult > *res, gpointer user_data) > g_error_free(err); > > gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data->check), FALSE); > -spice_usb_device_widget_update_status(se

Re: [Spice-devel] [PATCH v5 07/13] UsbDeviceManager: Implement asynchronous disconnect device flow

2016-02-10 Thread Jonathon Jongsma
On Wed, 2016-02-10 at 16:36 -0600, Jonathon Jongsma wrote: > On Thu, 2015-10-29 at 17:27 +0200, Dmitry Fleytman wrote: > > > From: Kirill Moizik > > > > This commit introduces functions for asynchronous disconnection flows. > > Following commits will make use of th

Re: [Spice-devel] [PATCH v5 12/13] UsbDeviceWidget: Use asynchronous disconnect API

2016-02-10 Thread Jonathon Jongsma
device); > +spice_usb_device_manager_disconnect_device_async(priv->manager, > + device, > + NULL, > +

Re: [Spice-devel] [PATCH v5 13/13] UsbDeviceManager: Make synchronous disconnect method static

2016-02-10 Thread Jonathon Jongsma
c( > gboolean spice_usb_device_manager_connect_device_finish( > SpiceUsbDeviceManager *self, GAsyncResult *res, GError **err); > > -void spice_usb_device_manager_disconnect_device(SpiceUsbDeviceManager > *manager, > -SpiceUsbDevice *device); > - > gboolea

Re: [Spice-devel] [PATCH] Store 'renderers' as GArray in RedsState

2016-02-11 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Thu, 2016-02-11 at 07:43 -0500, Frediano Ziglio wrote: > > Subject: [PATCH] Store 'renderers' as GArray in RedsState > > > > This version change just that renderers are not stored in DisplayChannel. > Note that this (as your patch)

Re: [Spice-devel] [PATCH 01/11] dispatcher: remove unused async_commands ring

2016-02-11 Thread Jonathon Jongsma
Hmm, even after looking at where this was introduced, it appears to have never been used. I'd say that it's safe to remove Acked-by: Jonathon Jongsma On Tue, 2016-02-09 at 10:27 +, Frediano Ziglio wrote: > The only usage of this ring was to have a message when there was no >

  1   2   3   4   5   6   7   8   9   10   >