[Spice-devel] [PATCH phodav 10/13] spice-win: don't assign drive_letter on error

2019-05-23 Thread Jakub Janků
drive_letter should be assigned only when the mapping was successful. Signed-off-by: Jakub Janků --- spice/spice-webdavd.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c index 29058e7..f2c7f07 100644 --- a/spice/spic

[Spice-devel] [PATCH phodav 05/13] spice: clear loop pointer on unref

2019-05-23 Thread Jakub Janků
The pointer to loop must be set to NULL on unref. Quit signal handler can be called at any time, using g_main_loop_quit() on a freed loop could lead to segfault. Signed-off-by: Jakub Janků --- spice/spice-webdavd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spice/s

[Spice-devel] [PATCH phodav 01/13] spice: remove G_SOURCE_{REMOVE, CONTINUE} definitions

2019-05-23 Thread Jakub Janků
Other symbols that were added after G_SOURCE_{REMOVE, CONTINUE} are already being used in the rest of the file - e.g. g_task_new, so there's no need to define these. Signed-off-by: Jakub Janků --- spice/spice-webdavd.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/spice/spice-webdavd

[Spice-devel] [PATCH phodav 09/13] spice-win: remove MapDriveEnum

2019-05-23 Thread Jakub Janků
The enum doesn't add much value, let's remove it. Signed-off-by: Jakub Janků --- spice/spice-webdavd.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c index c77c870..29058e7 100644 --- a/spice/spice-webdavd.c

[Spice-devel] [PATCH phodav 08/13] spice-win: define SERVICE_NAME

2019-05-23 Thread Jakub Janků
Signed-off-by: Jakub Janků --- spice/spice-webdavd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c index 681e909..c77c870 100644 --- a/spice/spice-webdavd.c +++ b/spice/spice-webdavd.c @@ -31,6 +31,7 @@ #include #include

[Spice-devel] [PATCH phodav 13/13] rename NEWS to NEWS.md

2019-05-23 Thread Jakub Janků
The filename needs the proper extension for GitLab to handle the file as a Markdown file. Signed-off-by: Jakub Janků --- NEWS => NEWS.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename NEWS => NEWS.md (100%) diff --git a/NEWS b/NEWS.md similarity index 100% rename from NEWS rename

[Spice-devel] [PATCH phodav 03/13] spice: handle SIGINT properly

2019-05-23 Thread Jakub Janků
According to [0], g_debug should not be used in a signal handler. So, to avoid reentrancy, do not print debug message when quit is called with SIGINT. [0] https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/signal?view=vs-2019 Signed-off-by: Jakub Janků --- spice/spice-webdavd.c |

[Spice-devel] [PATCH phodav 07/13] spice: unref GSocketAddress

2019-05-23 Thread Jakub Janků
No need to keep it around after calling g_socket_listener_add_address(). Signed-off-by: Jakub Janků --- spice/spice-webdavd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c index d9b1fae..681e909 100644 --- a/spice/spice-webdavd.c +++ b/spice/sp

[Spice-devel] [PATCH phodav 02/13] spice: rename my_input_channel

2019-05-23 Thread Jakub Janků
my_input_channel_* isn't saying much, let's rename it to input_channel_*_thread, which is more fitting. Signed-off-by: Jakub Janků --- spice/spice-webdavd.c | 48 +-- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/spice/spice-webdavd.c b/s

[Spice-devel] [PATCH phodav 06/13] spice: print err when g_open fails

2019-05-23 Thread Jakub Janků
Don't fail silently when we cannot open the webdav virtio port. Signed-off-by: Jakub Janků --- spice/spice-webdavd.c | 5 + 1 file changed, 5 insertions(+) diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c index 3fac28b..d9b1fae 100644 --- a/spice/spice-webdavd.c +++ b/spice/spice-

[Spice-devel] [PATCH phodav 11/13] spice: move OutputQueue to file

2019-05-23 Thread Jakub Janků
OutputQueue is a self-contained unit and as such can be put in a separate file to make the spice-webdavd.c less cluttered. Also, as the current implementation defines output_queue_{ref, unref}, turn OutputQueue into a GObject which can handle these for us. Signed-off-by: Jakub Janků --- spice/m

[Spice-devel] [PATCH phodav 04/13] spice: quit service quickly

2019-05-23 Thread Jakub Janků
We shouldn't wait for 1 second if the service is supposed to stop. Signed-off-by: Jakub Janků --- spice/spice-webdavd.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c index cdfa73d..6ad63c5 100644 --- a/spice/spic

[Spice-devel] [PATCH phodav 00/13] Miscellaneous series

2019-05-23 Thread Jakub Janků
Hi, this series contains mostly fixes of some things that I came across while reading the spice-webdavd.c code, without any order. Cheers, Jakub Janků (13): spice: remove G_SOURCE_{REMOVE,CONTINUE} definitions spice: rename my_input_channel spice: handle SIGINT properly spice: quit serv

[Spice-devel] [PATCH phodav 12/13] rename README to README.md

2019-05-23 Thread Jakub Janků
The filename needs the proper extension for GitLab to handle the file as a Markdown file. Fix some style issues so that the file renders correctly. Signed-off-by: Jakub Janků --- README => README.md | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) rename README =>

[Spice-devel] use spice proxy

2019-05-23 Thread zap83q
Hi, When I try to use proxy to connect spice server, it return a virt-viewer warning: "donnot allow http proxy connect", why? I do config like https://www.spice-space.org/spice-proxy.html___ Spice-devel mailing list Spice-devel@lists.freedesktop.org h

Re: [Spice-devel] use spice proxy

2019-05-23 Thread Victor Toso
Hi, On Thu, May 23, 2019 at 03:38:32PM +0800, zap83q wrote: > Hi, >When I try to use proxy to connect spice server, it return a >virt-viewer warning: "donnot allow http proxy connect", why? > I do config like https://www.spice-space.org/spice-proxy.html Could you please post: - Spice-gtk/

Re: [Spice-devel] [PATCH v2 spice-gtk] Adjust to window scaling

2019-05-23 Thread Snir Sheriber
Hi, On 5/22/19 6:02 PM, Marc-André Lureau wrote: Hi On Sun, Mar 17, 2019 at 4:28 PM Snir Sheriber wrote: When GDK_SCALE is != 1 and egl is used, the image presented does not fit to the window (scale of 2 is often used with hidpi monitors). Usually this is not a problem since all components ar

Re: [Spice-devel] [PATCH v2 spice-gtk] Adjust to window scaling

2019-05-23 Thread Victor Toso
Hi, On Thu, May 23, 2019 at 01:01:12PM +0300, Snir Sheriber wrote: > Hi, > > On 5/22/19 6:02 PM, Marc-André Lureau wrote: > > Hi > > > > On Sun, Mar 17, 2019 at 4:28 PM Snir Sheriber wrote: > > > When GDK_SCALE is != 1 and egl is used, the image presented does not > > > fit to the window (scale

Re: [Spice-devel] [PATCH phodav 01/13] spice: remove G_SOURCE_{REMOVE, CONTINUE} definitions

2019-05-23 Thread Marc-André Lureau
On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > Other symbols that were added after G_SOURCE_{REMOVE, CONTINUE} > are already being used in the rest of the file - e.g. g_task_new, > so there's no need to define these. > > Signed-off-by: Jakub Janků ack, we should bump glib dep to 2.36 at

Re: [Spice-devel] [PATCH phodav 02/13] spice: rename my_input_channel

2019-05-23 Thread Marc-André Lureau
Hi On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > my_input_channel_* isn't saying much, > let's rename it to input_channel_*_thread, > which is more fitting. > > Signed-off-by: Jakub Janků > --- > spice/spice-webdavd.c | 48 +-- > 1 file changed,

Re: [Spice-devel] [PATCH phodav 03/13] spice: handle SIGINT properly

2019-05-23 Thread Marc-André Lureau
Hi On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > According to [0], g_debug should not be used in a signal handler. > So, to avoid reentrancy, do not print debug message when quit is > called with SIGINT. > > [0] > https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/signal?

Re: [Spice-devel] [PATCH phodav 04/13] spice: quit service quickly

2019-05-23 Thread Marc-André Lureau
On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > We shouldn't wait for 1 second if the service is supposed to stop. > > Signed-off-by: Jakub Janků ack > --- > spice/spice-webdavd.c | 15 +-- > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/spice/spice-webda

Re: [Spice-devel] [PATCH phodav 05/13] spice: clear loop pointer on unref

2019-05-23 Thread Marc-André Lureau
On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > The pointer to loop must be set to NULL on unref. > > Quit signal handler can be called at any time, > using g_main_loop_quit() on a freed loop could lead to segfault. I am not sure if this is enough to solve the race you describe (handler c

Re: [Spice-devel] [PATCH phodav 06/13] spice: print err when g_open fails

2019-05-23 Thread Marc-André Lureau
On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > Don't fail silently when we cannot open the webdav virtio port. > > Signed-off-by: Jakub Janků ack > --- > spice/spice-webdavd.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c >

Re: [Spice-devel] [PATCH phodav 07/13] spice: unref GSocketAddress

2019-05-23 Thread Marc-André Lureau
On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > No need to keep it around after calling > g_socket_listener_add_address(). > > Signed-off-by: Jakub Janků ack > --- > spice/spice-webdavd.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/spice/spice-webdavd.c b/spice/spice-webda

Re: [Spice-devel] [PATCH phodav 08/13] spice-win: define SERVICE_NAME

2019-05-23 Thread Marc-André Lureau
On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > Signed-off-by: Jakub Janků ack > --- > spice/spice-webdavd.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c > index 681e909..c77c870 100644 > --- a/spice/spice-w

Re: [Spice-devel] [PATCH phodav 09/13] spice-win: remove MapDriveEnum

2019-05-23 Thread Marc-André Lureau
On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > The enum doesn't add much value, let's remove it. > > Signed-off-by: Jakub Janků ack > --- > spice/spice-webdavd.c | 19 +++ > 1 file changed, 7 insertions(+), 12 deletions(-) > > diff --git a/spice/spice-webdavd.c b/spice

Re: [Spice-devel] [PATCH phodav 10/13] spice-win: don't assign drive_letter on error

2019-05-23 Thread Marc-André Lureau
On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > drive_letter should be assigned only when the mapping was successful. > > Signed-off-by: Jakub Janků ack > spice/spice-webdavd.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/spice/spice-webdavd.c b

Re: [Spice-devel] [PATCH phodav 11/13] spice: move OutputQueue to file

2019-05-23 Thread Marc-André Lureau
Hi On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > OutputQueue is a self-contained unit and as such can be put in > a separate file to make the spice-webdavd.c less cluttered. > > Also, as the current implementation defines output_queue_{ref, unref}, > turn OutputQueue into a GObject whic

Re: [Spice-devel] [PATCH phodav 12/13] rename README to README.md

2019-05-23 Thread Marc-André Lureau
On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > The filename needs the proper extension for GitLab to handle > the file as a Markdown file. > > Fix some style issues so that the file renders correctly. > > Signed-off-by: Jakub Janků why not, ack > --- > README => README.md | 21 +++

Re: [Spice-devel] [PATCH phodav 13/13] rename NEWS to NEWS.md

2019-05-23 Thread Marc-André Lureau
On Thu, May 23, 2019 at 10:38 AM Jakub Janků wrote: > > The filename needs the proper extension for GitLab to handle > the file as a Markdown file. > > Signed-off-by: Jakub Janků small nack, I am not sure how GNOME ftprelease will handle that change, at the moment they document NEWS file only:

Re: [Spice-devel] [PATCH phodav 00/13] Miscellaneous series

2019-05-23 Thread Marc-André Lureau
Hi On Thu, May 23, 2019 at 10:37 AM Jakub Janků wrote: > > Hi, > > this series contains mostly fixes of some things > that I came across while reading the spice-webdavd.c code, > without any order. > > Cheers, > > Jakub Janků (13): > spice: remove G_SOURCE_{REMOVE,CONTINUE} definitions > spic

Re: [Spice-devel] [spice-gtk v1 3/4] usb-redirection: isolate usage of libusb and usbredirhost

2019-05-23 Thread Yuri Benditovich
On Tue, May 21, 2019 at 1:45 PM Victor Toso wrote: > > Hi, > > So this is the core of the series and we have a lot going on > here. The goal of this email is to start a discussion on current > design and proposed design and what can still be improved. > > To be able to provide good enough feedback

[Spice-devel] [PATCH spice-server] dispatcher: Use a new API to handle events

2019-05-23 Thread Frediano Ziglio
Instead of having to manually register the file descriptor and than need to call dispatcher_handle_recv_read just provide a single API to create the watch. This has some advantage: - replace 2 API with 1; - code reuse for handling the event (removed 2 functions); - avoid the caller to use the file

[Spice-devel] [PATCH spice-server] inputs-channel-client: Remove unused declarations

2019-05-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/inputs-channel-client.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/server/inputs-channel-client.h b/server/inputs-channel-client.h index c22288980..1afc22bd4 100644 --- a/server/inputs-channel-client.h +++ b/server/inputs-channel-client.h @@ -6

[Spice-devel] [PATCH spice-server] red-channel: Remove unused declaration

2019-05-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/red-channel.h | 1 - 1 file changed, 1 deletion(-) diff --git a/server/red-channel.h b/server/red-channel.h index 4bfd81ee1..eb16bd4b8 100644 --- a/server/red-channel.h +++ b/server/red-channel.h @@ -47,7 +47,6 @@ typedef struct MainChannelClient MainCha

[Spice-devel] [PATCH spice-server] red-channel-client: Reduce indentation of some code

2019-05-23 Thread Frediano Ziglio
Just a style change, return earlier to avoid some indentation. Signed-off-by: Frediano Ziglio --- server/red-channel-client.c | 37 +++-- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/server/red-channel-client.c b/server/red-channel-client.c inde