Preparation for converting to GObject
---
server/Makefile.am | 2 +
server/inputs-channel-client.c | 87 ++
server/inputs-channel-client.h | 48 +++
server/inputs-channel.c| 80 +++---
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-encoders.c| 11 +++---
server/dcc-encoders.h
Remove the custom FOREACH_DCC macro and use the more generic
FOREACH_CLIENT macro and use it for all channels.
---
server/display-channel.c | 20 ++--
server/display-channel.h | 9 -
server/main-channel.c| 32 +++-
server/red-channel.c |
From: Frediano Ziglio
Make the call more similar to other marshall function calls in the
same function.
Signed-off-by: Frediano Ziglio
---
server/main-channel-client.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/server/main-channel-client.c b/server/main-channe
Just a small set of patches incorporating some comments from previous review.
The new "Add FOREACH_CLIENT" commit was in response to Frediano's request to
use a macro for looping through clients in his review of "Replace
RedChannel::clients with GList". This new commit could be squashed into that
o
From: Frediano Ziglio
Move all core to create and destroy MainChannel pipe items in a single
place.
Signed-off-by: Frediano Ziglio
---
server/main-channel-client.c | 34 ++
server/main-channel-client.h | 15 +--
server/main-channel.c| 29 +---
Allows us to not expose the client_link in RedChannelClient.
Acked-by: Pavel Grunt
---
server/red-channel.c | 51 ---
server/red-channel.h | 5 +
2 files changed, 29 insertions(+), 27 deletions(-)
diff --git a/server/red-channel.c b/server/re
Instead of using a Ring, use a GList to store the list of channel
clients. This allows us to iterate the clients without poking inside of
the client struct to get the channel_link. This is required in order to
make the RedChannelClient struct private.
---
server/display-channel.c | 64 ---
Acked-by: Jonathon Jongsma
On Fri, 2016-05-20 at 14:01 +0100, Frediano Ziglio wrote:
> Scan remaining code searching for problems with structure
> layout assumptions in the code.
> Where code required some restructuring put some verify checks
> to make sure code won't compile if these assumptions
In general, this is a good idea, but I question why you're doing it now. There
are patches already in the refactory branch which change the PipeItem ring into
a GList (although perhaps GQueue might be more appropriate). That patch would
also fix the underlying issue you're solving here. So having b
Acked-by: Jonathon Jongsma
On Fri, 2016-05-20 at 14:01 +0100, Frediano Ziglio wrote:
> Make code more type safe. This allow to move or delete structure
> fields more safely
>
> Signed-off-by: Frediano Ziglio
> ---
> server/dcc.c | 6 +++---
> server/reds.c | 2 +-
> server/smartcard
Acked-by: Jonathon Jongsma
On Fri, 2016-05-20 at 14:01 +0100, Frediano Ziglio wrote:
> All other classes using RedPipeItem as base use base as parent name
>
> Signed-off-by: Frediano Ziglio
> ---
> server/reds.c | 22 +++---
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
ok, I'll take some added typesafety over a having to pass the ->parent
occasionally
Acked-by: Jonathon Jongsma
On Fri, 2016-05-20 at 14:01 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio
> ---
> server/char-device.c | 2 +-
> server/red-pipe-item.c | 4 +---
> server/red-pi
Acked-by: Jonathon Jongsma
On Fri, 2016-05-20 at 14:01 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio
> ---
> server/red-pipe-item.c | 4 +---
> server/red-pipe-item.h | 2 +-
> server/reds.c | 2 +-
> server/spicevmc.c | 4 ++--
> 4 files changed, 5 insertions(+),
Acked-by: Jonathon Jongsma
On Fri, 2016-05-20 at 14:01 +0100, Frediano Ziglio wrote:
> Use a proper type for free callback
>
> Signed-off-by: Frediano Ziglio
> ---
> server/cursor-channel.c | 10 ++
> server/dcc.c| 8 +---
> server/main-channel.c | 10 ++
> s
I would prefer a more elegant long-term solution, but this is OK as a short-term
solution
Acked-by: Jonathon Jongsma
On Fri, 2016-05-20 at 14:01 +0100, Frediano Ziglio wrote:
> This avoids having to retain a pointer just to check item is still in
> the queue with ring_item_is_linked(&item->link
Acked-by: Jonathon Jongsma
On Fri, 2016-05-20 at 14:01 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio
> ---
> server/dcc-send.c| 4 ++--
> server/dcc.h | 2 +-
> server/display-channel.c | 7 +--
> 3 files changed, 4 insertions(+), 9 deletions(-)
>
> di
Better.
Acked-by: Jonathon Jongsma
On Fri, 2016-05-20 at 14:01 +0100, Frediano Ziglio wrote:
> Remove the need to release the item inside send_item callbacks.
> This looks like a partial rollback of previous patch but is
> to make clear the intention of the change.
> The lifetime of items could
On Fri, 2016-05-20 at 14:01 +0100, Frediano Ziglio wrote:
> This is quite confusing and prone to errors.
> Use RedPipeItem reference counting instead.
> To compensate for the additional reference due to red_pipe_item_ref
> in RedChannel sub class with empty hold_item have to add a
> red_pipe_item_u
>
> They are no longer needed since 0a9ec4ec0.
>
> Signed-off-by: Marc-André Lureau
> ---
> src/channel-usbredir.c | 10 +-
> src/spice-channel-priv.h | 2 +-
> src/spice-channel.c | 28 ++--
> src/spice-util-priv.h| 6 --
> 4 files changed, 20 i
On Fri, May 20, 2016 at 5:16 PM, Marc-André Lureau
wrote:
> For some unclear reason, when multiple display use gl in the same
> process (with virt-manager for ex), the texture content can be
> overwritten by another display on update.
>
> Although the gl contexts are differents when using multiple
For some unclear reason, when multiple display use gl in the same
process (with virt-manager for ex), the texture content can be
overwritten by another display on update.
Although the gl contexts are differents when using multiple widgets,
even when sharing a texture ID, it shouldn't overwrite the
The egl context is from Gtk on Wayland. Destroy it only on X11.
Signed-off-by: Marc-André Lureau
---
src/spice-widget-egl.c | 25 ++---
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
index 7611b0b..fff2831 10064
On X11, each widget has its own context. Make sure we are using the
widget associated context when using gl.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1337721
Signed-off-by: Marc-André Lureau
---
src/spice-widget-egl.c | 15 +++
1 file changed, 15 insertions(+)
diff --git
This is global to the display connection: all egl resources will be
released, including those from other widgets or from the application.
Fix spice/virgl display being rendered black after another widget
display is destroyed.
Signed-off-by: Marc-André Lureau
---
src/spice-widget-egl.c | 1 -
1
Gtk does it for us already with GtkGlArea.
Signed-off-by: Marc-André Lureau
---
src/spice-widget-egl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
index fff2831..210b834 100644
--- a/src/spice-widget-egl.c
+++ b/src/spice
Since 8943d2329, the channel may be disconnected from the session
before it's destroyed. In this case, session is NULL.
Fixes some critical with virt-manager when closing a display:
(virt-manager:20451): GSpice-CRITICAL **: spice_session_is_for_migration:
assertion 'SPICE_IS_SESSION(session)' fa
They are no longer needed since 0a9ec4ec0.
Signed-off-by: Marc-André Lureau
---
src/channel-usbredir.c | 10 +-
src/spice-channel-priv.h | 2 +-
src/spice-channel.c | 28 ++--
src/spice-util-priv.h| 6 --
4 files changed, 20 insertions(+), 26 dele
Limit the virtual keystrokes sent to the remote machine.
The modifiers are synced only when the application receive or lose
the focus. This reduce a lot the possible virtual keystrokes sent
to the guest to synchronize the modifiers.
This affect the situations where modifiers are configured
differen
>
> On Thu, 2016-05-19 at 18:25 +0200, Christophe Fergeau wrote:
> > Hey,
> >
> > On Thu, May 19, 2016 at 06:14:52AM -0400, Frediano Ziglio wrote:
> > > Possible future changes (please comment):
> > > - would be good if red_channel_client_wait_pipe_item_sent could work even
> > > without the ho
Use a proper type for free callback
Signed-off-by: Frediano Ziglio
---
server/cursor-channel.c | 10 ++
server/dcc.c| 8 +---
server/main-channel.c | 10 ++
server/red-channel.c| 6 --
server/red-pipe-item.c | 4 ++--
server/red-pipe-item.h | 10 +++
Signed-off-by: Frediano Ziglio
---
server/char-device.c | 2 +-
server/red-pipe-item.c | 4 +---
server/red-pipe-item.h | 2 +-
server/reds.c | 12 +---
4 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/server/char-device.c b/server/char-device.c
index b67e192.
There are many line of code were this assumption is in place.
For instance RedPipeItem* is converted to RingItem* or
viceversa.
Use SPICE_CONTAINEROF to make sure link is in RedPipeItem and the
offset is computed correctly.
Also check that RingItem pointer is checked before SPICE_CONTAINEROF.
On th
This avoids having to retain a pointer just to check item is still in
the queue with ring_item_is_linked(&item->link).
Signed-off-by: Frediano Ziglio
---
server/red-channel.c | 30 ++
server/red-channel.h | 1 +
2 files changed, 27 insertions(+), 4 deletions(-)
diff
This patchset collect 2 different changes:
- work on RedChannel for reference counting changes
and cleanup;
- different type safety improvements to avoid structure
layout assumption and make easier to move/remove fields
on different structures.
Frediano Ziglio (11):
Remove RedChannel::hold
This is quite confusing and prone to errors.
Use RedPipeItem reference counting instead.
To compensate for the additional reference due to red_pipe_item_ref
in RedChannel sub class with empty hold_item have to add a
red_pipe_item_unref call in send_item.
Signed-off-by: Frediano Ziglio
---
server
Signed-off-by: Frediano Ziglio
---
server/red-pipe-item.c | 4 +---
server/red-pipe-item.h | 2 +-
server/reds.c | 2 +-
server/spicevmc.c | 4 ++--
4 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/server/red-pipe-item.c b/server/red-pipe-item.c
index cc0ab5a..74bf267
Make code more type safe. This allow to move or delete structure
fields more safely
Signed-off-by: Frediano Ziglio
---
server/dcc.c | 6 +++---
server/reds.c | 2 +-
server/smartcard.c | 4 ++--
server/spicevmc.c | 5 ++---
server/stream.c| 2 +-
5 files changed, 9 insertions(+),
Scan remaining code searching for problems with structure
layout assumptions in the code.
Where code required some restructuring put some verify checks
to make sure code won't compile if these assumptions are not
in place anymore.
Signed-off-by: Frediano Ziglio
---
server/cache-item.tmpl.c | 1
All other classes using RedPipeItem as base use base as parent name
Signed-off-by: Frediano Ziglio
---
server/reds.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/server/reds.c b/server/reds.c
index 74de7d5..fa9a79e 100644
--- a/server/reds.c
+++ b/
Signed-off-by: Frediano Ziglio
---
server/dcc-send.c| 4 ++--
server/dcc.h | 2 +-
server/display-channel.c | 7 +--
3 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/server/dcc-send.c b/server/dcc-send.c
index 05da07f..8ec22c8 100644
--- a/server/dcc-send.c
+
Remove the need to release the item inside send_item callbacks.
This looks like a partial rollback of previous patch but is
to make clear the intention of the change.
The lifetime of items could extend a bit further but there
are no cases this small lag should cause problems.
Signed-off-by: Fredia
On Fri, 2016-05-20 at 14:50 +0200, Christophe Fergeau wrote:
> On Thu, May 19, 2016 at 06:38:08PM +0200, Pavel Grunt wrote:
> > Related: rhbz#1335239
> > ---
> > src/spice-uri.c| 8 ++--
> > tests/test-spice-uri.c | 2 ++
> > 2 files changed, 8 insertions(+), 2 deletions(-)
> >
> > di
The varible is compared with G_N_ELEMENTS which returns unsigned value
---
tests/session.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/session.c b/tests/session.c
index d065b60..00076f2 100644
--- a/tests/session.c
+++ b/tests/session.c
@@ -3,7 +3,7 @@
static void te
---
tests/session.c | 30 --
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/tests/session.c b/tests/session.c
index 00a5a1e..eace40a 100644
--- a/tests/session.c
+++ b/tests/session.c
@@ -1,6 +1,31 @@
#include
-static void test_session_uri(void)
+sta
Hi,
I plan to merge both uri parsers (one is in spice-session, one in spice-uri).
These patches add more to tests to avoid regressions.
Thanks,
Pavel Grunt (5):
test-session: Fix signed compare
test-session: Test alternative way for setting port
test-session: Do not fail on g_warning
tes
Following commit adds tests for password set in uri which will produce
a runtime warning. Reset fatal mask set by g_test_init() to avoid
failing.
---
tests/session.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/tests/session.c b/tests/session.c
index a6276c2..549378b 100644
--- a/t
---
tests/session.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tests/session.c b/tests/session.c
index 00076f2..a6276c2 100644
--- a/tests/session.c
+++ b/tests/session.c
@@ -24,6 +24,12 @@ static void test_session_uri(void)
{ NULL, "5930",
"spice://localhost?por
---
tests/session.c | 48 +---
1 file changed, 45 insertions(+), 3 deletions(-)
diff --git a/tests/session.c b/tests/session.c
index 549378b..00a5a1e 100644
--- a/tests/session.c
+++ b/tests/session.c
@@ -8,33 +8,63 @@ static void test_session_uri(void)
On Thu, May 19, 2016 at 06:38:08PM +0200, Pavel Grunt wrote:
> Related: rhbz#1335239
> ---
> src/spice-uri.c| 8 ++--
> tests/test-spice-uri.c | 2 ++
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/src/spice-uri.c b/src/spice-uri.c
> index b483374..6a43461 100644
On Fri, May 20, 2016 at 11:07:58AM +0200, Pavel Grunt wrote:
> > > diff --git a/src/spice-uri.c b/src/spice-uri.c
> > > index 3bdb502..04ea3cb 100644
> > > --- a/src/spice-uri.c
> > > +++ b/src/spice-uri.c
> > > @@ -105,6 +105,13 @@ gboolean spice_uri_parse(SpiceURI *self, const gchar
> > > *_uri,
On Thu, 2016-05-19 at 11:10 +0200, Christophe Fergeau wrote:
> Is this in anyway related to
> https://github.com/iiordanov/remote-desktop-clients ? Or did you
> start
> the Android client from scratch?
There could be some similarities in our glue code, as we took a look at
it to quickly find the e
On Thu, May 19, 2016 at 01:21:46PM +0200, Victor Toso wrote:
> Each call to spice_main_file_copy_async will now create a
> FileTransferOperation which groups all SpiceFileTransferTasks of the
> copy operation and also the progress_callback passed from Application.
>
> As pointed in the fix 113093d
On Fri, May 20, 2016 at 06:44:01AM -0400, Frediano Ziglio wrote:
> Hi,
> I'd like to have some standard on the internal documentation of
> spice-server.
>
> The current situation is quite messy having different styles.
> I think the worst think is not having any documentation, so better messy
>
Hi,
I'd like to have some standard on the internal documentation of spice-server.
The current situation is quite messy having different styles.
I think the worst think is not having any documentation, so better messy
than nothing.
I really like Doxygen as it's really complete tool however my Gtk
This avoids having to retain a pointer just to check item is still in
the queue with ring_item_is_linked(&item->link).
Signed-off-by: Frediano Ziglio
---
server/red-channel.c | 30 ++
server/red-channel.h | 1 +
2 files changed, 27 insertions(+), 4 deletions(-)
diff
>
> On 05/18/2016 07:14 AM, Christophe Fergeau wrote:
> > On Wed, May 18, 2016 at 12:46:03PM +0300, Uri Lublin wrote:
> >>
> >> In man cmsg examples I see they use a pointer:
> >> int *pi = (int*) CMSG_DATA(cmsg);
> >> *fd = *pi;
> >
> > It seems to work this way, but I'm not sure why this works
Signed-off-by: Frediano Ziglio
---
server/dcc-send.c| 4 ++--
server/dcc.h | 2 +-
server/display-channel.c | 7 +--
3 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/server/dcc-send.c b/server/dcc-send.c
index 05da07f..8ec22c8 100644
--- a/server/dcc-send.c
+
Remove the need to release the item inside send_item callbacks.
This looks like a partial rollback of previous patch but is
to make clear the intention of the change.
The lifetime of items could extend a bit further but there
are no cases this small lag should cause problems.
Signed-off-by: Fredia
This is quite confusing and prone to errors.
Use RedPipeItem reference counting instead.
To compensate for the additional reference due to red_pipe_item_ref
in RedChannel sub class with empty hold_item have to add a
red_pipe_item_unref call in send_item.
Signed-off-by: Frediano Ziglio
---
server
On Fri, 2016-05-20 at 10:36 +0200, Victor Toso wrote:
> Hi,
>
> On Thu, May 19, 2016 at 06:38:08PM +0200, Pavel Grunt wrote:
> > Related: rhbz#1335239
> > ---
> > src/spice-uri.c| 8 ++--
> > tests/test-spice-uri.c | 2 ++
> > 2 files changed, 8 insertions(+), 2 deletions(-)
> >
> >
On Fri, 2016-05-20 at 10:14 +0200, Victor Toso wrote:
> Hi,
>
> On Thu, May 19, 2016 at 06:38:05PM +0200, Pavel Grunt wrote:
> > Related: rhbz#1335239
> > ---
> > src/spice-uri.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/src/spice-uri.c b/src/spice-uri.c
> > index 8cf870d..3
On Fri, 2016-05-20 at 10:32 +0200, Victor Toso wrote:
> Hi,
>
> On Thu, May 19, 2016 at 06:38:07PM +0200, Pavel Grunt wrote:
> > Related: rhbz#1335239
> > ---
> > src/spice-uri.c| 3 +++
> > tests/test-spice-uri.c | 1 +
> > 2 files changed, 4 insertions(+)
> >
> > diff --git a/src/spice
On Fri, 2016-05-20 at 10:24 +0200, Victor Toso wrote:
> Hi,
>
> On Thu, May 19, 2016 at 06:38:06PM +0200, Pavel Grunt wrote:
> > Avoid using old values after parsing a new uri.
>
> A test case with re-using the SpiceURI could be handy
>
All the tests are reusing SpiceURI
> >
> > Related: rhbz#
On Fri, 2016-05-20 at 10:54 +0200, Victor Toso wrote:
> Hi,
>
> On Thu, May 19, 2016 at 06:38:09PM +0200, Pavel Grunt wrote:
> > Just basic support - http://user:password@[host]:port
> >
> > Resolves: rhbz#1335239
> > ---
> > src/spice-uri.c| 25 +
> > tests/test
Hi,
On Thu, May 19, 2016 at 06:38:09PM +0200, Pavel Grunt wrote:
> Just basic support - http://user:password@[host]:port
>
> Resolves: rhbz#1335239
> ---
> src/spice-uri.c| 25 +
> tests/test-spice-uri.c | 42 ++
> 2 files
Hi,
On Thu, May 19, 2016 at 06:38:08PM +0200, Pavel Grunt wrote:
> Related: rhbz#1335239
> ---
> src/spice-uri.c| 8 ++--
> tests/test-spice-uri.c | 2 ++
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/src/spice-uri.c b/src/spice-uri.c
> index b483374..6a43461 10
On Fri, May 20, 2016 at 10:32:00AM +0200, Victor Toso wrote:
> Hi,
>
> On Thu, May 19, 2016 at 06:38:07PM +0200, Pavel Grunt wrote:
> > Related: rhbz#1335239
> > ---
> > src/spice-uri.c| 3 +++
> > tests/test-spice-uri.c | 1 +
> > 2 files changed, 4 insertions(+)
> >
> > diff --git a/sr
Hi,
On Thu, May 19, 2016 at 06:38:07PM +0200, Pavel Grunt wrote:
> Related: rhbz#1335239
> ---
> src/spice-uri.c| 3 +++
> tests/test-spice-uri.c | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/src/spice-uri.c b/src/spice-uri.c
> index 04ea3cb..b483374 100644
> --- a/src/spice
Hi,
On Thu, May 19, 2016 at 06:38:06PM +0200, Pavel Grunt wrote:
> Avoid using old values after parsing a new uri.
A test case with re-using the SpiceURI could be handy
>
> Related: rhbz#1335239
> ---
> src/spice-uri.c| 7 +++
> tests/test-spice-uri.c | 4 ++--
> 2 files changed, 9
Hi,
On Thu, May 19, 2016 at 06:38:05PM +0200, Pavel Grunt wrote:
> Related: rhbz#1335239
> ---
> src/spice-uri.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/spice-uri.c b/src/spice-uri.c
> index 8cf870d..3bdb502 100644
> --- a/src/spice-uri.c
> +++ b/src/spice-uri.c
> @@ -22,6 +
On Thu, May 19, 2016 at 06:38:04PM +0200, Pavel Grunt wrote:
> ---
> src/spice-uri.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/spice-uri.c b/src/spice-uri.c
> index e1317bd..8cf870d 100644
> --- a/src/spice-uri.c
> +++ b/src/spice-uri.c
> @@ -340,7 +340,7 @@ sta
Hi,
On Thu, May 19, 2016 at 06:38:03PM +0200, Pavel Grunt wrote:
> Related: rhbz#1335239
> ---
> tests/Makefile.am | 2 ++
> tests/test-spice-uri.c | 73
> ++
> 2 files changed, 75 insertions(+)
> create mode 100644 tests/test-spice-uri.c
>
73 matches
Mail list logo