| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If spice_record_send_data() after a reset, last_frame is NULL and memcpy
will crash. Check if the recording was started if last_frame != NULL
instead.
Program received signal SIGSEGV, Segmentation fault.
__memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:204
204 vmovdqa %ymm0, (%rdi)
(gdb) bt
#0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:204
#1 0x00007ffff44f57b5 in spice_record_send_data (channel=0x1228640, data=0x7fff9ad0f000, bytes=960, time=0) at channel-record.c:349
#2 0x00007ffff45162f0 in stream_read_callback (s=0xad8c00, length=960, data=<optimized out>) at spice-pulse.c:485
#3 0x00007ffff2ea0c76 in pstream_memblock_callback (p=<optimized out>, channel=<optimized out>, offset=0, seek=PA_SEEK_RELATIVE, chunk=0x7fffffffcf70, userdata=0x11e71c0) at pulse/context.c:411
#4 0x00007fffe8da8b4f in do_read (p=p@entry=0x123a050, re=re@entry=0x123a1d0) at pulsecore/pstream.c:906
#5 0x00007fffe8daae87 in do_pstream_read_write (p=0x123a050) at pulsecore/pstream.c:193
#6 0x00007ffff30e1bea in dispatch_func (source=0x1111e50, callback=<optimized out>, userdata=<optimized out>) at pulse/glib-mainloop.c:584
#7 0x00007fffed76b93b in g_main_dispatch (context=0x816ea0) at gmain.c:3122
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1215343
|
|
|
|
|
|
| |
Channels do not hold a strong reference on the session (because session
can be recycled after disconnect), do not print a warning if the channel
is session-less when updating the delay.
|
|
|
|
|
|
|
|
| |
Ensure a hint is given to the client that the channel is reset.
Unfortunately, since the handle may be asynchronous due to coroutine,
the channel functions should be tolerant to a playback/record calls
functions when the channel is stopped.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Client usually connect to channel-new to connect their
handlers, such as open-fd.
The audio channel-new handler will call channel_connect() on audio
channels, which may call open-fd.
However, open-fd can be emitted before the client had a chance to
connect their handlers (from the channel-new callback).
Connecting after the default handler solves this case.
Fixes:
https://bugzilla.gnome.org/show_bug.cgi?id=747649
|
|
|
|
|
|
|
| |
The commit 37ba949716ebf441110330 breaks compatibility with old versions
of libpulse as the volume and mute data in pa_source_output_info were
available only from version 1.0.0 onwards. Using other API function for
this which does not relay on audio per stream.
|
|
|
|
|
| |
Avoid breaking build with glib older then 2.32 which is when
g_simple_async_result_set_check_cancellable was introduced.
|
| |
|
|
|
|
|
|
|
|
|
| |
A cleaner way to get the lock modifiers, without depend on the
platform/backend used (as X or Wayland), is get them through GdkKeymap
(and its _get{caps,num,scroll}_lock_state() functions).
Unfortunately, get_scroll_lock_state() will only be present for Gtk+
3.18.0 and when it becomes the minimal required version we can easily
drop the old code.
|
|
|
|
|
|
|
| |
Functions to sync volume and mute value when necessary. In this patch,
only one sync is allowed after agent connect.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1012868
|
|
|
|
|
|
| |
Gstaudio rely on sink/src elements to get the volume/mute.
(e.g. pulsesink and pulsesrc, the values are updated by PulseAudio
itself when requested)
|
|
|
|
|
|
|
|
|
|
|
| |
In case of volume-sync between client and guest, we request volume-info
from the availables streams and if the stream is not available we rely
on ext-stream-restore.
By using ext-stream-restore we can get the last stream data of the
application that is stored by PulseAudio.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1012868
|
|
|
|
|
|
|
| |
Async functions to be implemented by spice-gstaudio and spice-pulse to
get the updated volume and mute values for playback and record stream.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1012868
|
|
|
|
| |
This includes volume synchronization protocol;
|
|
|
|
|
|
|
| |
spice_display_get_scaling() gives wrong x, y coordinates and scaling
when the display is not ready. The wrong values cause runtime
warnings when disabling a virt-viewer's window:
Gtk-CRITICAL **: gtk_widget_queue_draw_area: assertion 'width >= 0' failed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
g_proxy_address_new() returns a new GProxyAddress, so we must unref it
when no longer needed.
This fixes:
==6481== 234 (48 direct, 186 indirect) bytes in 1 blocks are definitely lost in loss record 10,062 of 10,
==6481== at 0x31FF230A58: g_type_create_instance (gtype.c:1849)
==6481== by 0x31FF21501A: g_object_new_internal (gobject.c:1774)
==6481== by 0x31FF216EB4: g_object_new_valist (gobject.c:2033)
==6481== by 0x31FF217220: g_object_new (gobject.c:1617)
==6481== by 0x3D4386F33A: g_proxy_address_new (gproxyaddress.c:325)
==6481== by 0x5717440: proxy_lookup_ready (spice-session.c:2011)
==6481== by 0x3D43885082: g_task_return_now (gtask.c:1088)
==6481== by 0x3D438850B8: complete_in_idle_cb (gtask.c:1102)
==6481== by 0x31FEE4A0B9: g_main_dispatch (gmain.c:3122)
==6481== by 0x31FEE4A0B9: g_main_context_dispatch (gmain.c:3737)
==6481== by 0x31FEE4A44F: g_main_context_iterate.isra.29 (gmain.c:3808)
==6481== by 0x31FEE4A771: g_main_loop_run (gmain.c:4002)
==6481== by 0x363AC06CC4: gtk_main (in /usr/lib64/libgtk-3.so.0.1600.1)
|
|
|
|
|
|
| |
rewrite the update-symbol-files rule to use dependencies and automatic
variables ($^) so that VPATH will allow make to find these files in the
srcdir as well as the builddir.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On local UNIX sockets, calling close() in the server side will result in
a HUP condition on client side. Since this is not an error, but a normal
termination, let's ignore it.
A clean shutdown would involve a new message to tell the client to first
close its end, in order to avoid the HUP. That way the client could
distinguish normal termination from unexpected ones. That's a possible
future minor enhancement (it seems it would only work with UNIX socket
though)
G_IO_IN seemed to be a leftover, it is left here but shouldn't be
required.
https://bugs.freedesktop.org/show_bug.cgi?id=90016
|
|
|
|
|
|
|
|
|
|
|
| |
Whenever the channel socket is connected, c->has_error should be reset.
Until now, only the regular open_host() case was reset, but client
client provided fd must also reset the error state.
It should be safe to move it after the "connected" label, since the
ssl code doesn't need c->has_error.
https://bugzilla.redhat.com/show_bug.cgi?id=1211063
|
|
|
|
|
|
| |
The commit 9ef68ecd1fd11dea626628 breaks compatibility with old versions
of libpulse as the source_output functions were available from version
1.0.0 onwards.
|
|
|
|
| |
In order to enable build without smartcard support
|
|
|
|
|
|
|
|
|
|
| |
The smartcard manager reports reader/card events on insertion and
removal. If a smartcard channel is created after those events, the
channel state will not be in sync with the current reader/card state.
Sync the state when the channel is up.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1205171
|
|
|
|
|
|
|
|
|
|
| |
The smartcard manager may outlive the smartcard channels. Make sure the
channel handlers are disconnected when the channel is free by using
spice_g_signal_connect_object() helper. This fixes crashes when
dispatching smartcard events on deleted channels.
Related bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1205171
|
|
|
|
|
|
| |
The functions pa_context_set_source_output_mute/volume are specifically
to change source stream volume/mute.
I changed the warnings to be compatible to sink_input ones;
|
|
|
|
|
|
|
|
| |
315c1a5 "session: Add more debugging logs" causes a g_warning() to be
shown when attempting a TLS connection without specifying a non-TLS
port.
This commit makes the message more explicit, and switches it from being
a warning to being a debug message.
|
|
|
|
| |
Avoids Segfault when closing the connection just after the usb device redirection.
|
|
|
|
|
|
|
|
|
| |
There are generated files in build directory too. Fixes:
CC util.o
In file included from ../../tests/session.c:3:0:
../../gtk/spice-session.h:24:30: fatal error: spice-glib-enums.h:
No such file or directory #include "spice-glib-enums.h"
|
| |
|
| |
|
|
|
|
| |
Commit 85ed268 shouldn't have change spice-common, my bad
|
|
|
|
| |
Keep the server property in sync with the session properties
|
|
|
|
| |
Add a property to specify if share folder access is read-only.
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of listening on TCP sockets, and proxying connections there,
make the webdav server accept new connections from stream. The streams
are user-space GIOStream pipe, one side is connected to the Spice webdav
channel muxer/demuxer, the other side is a SoupSocket client.
This makes the server not exposed any local public access, avoid the
need for server threads, or proxying the connections through system
sockets.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change breaks webdav server, since libphodav-2 no longer
set up a TCP service running in a thread. It's up to the client
to decide how best to accept and handle new connections.
This commits remove all the hacks related to proxying the incoming
connections to a TCP socket, and protected with a magic sequence.
The following commit will use GIOStream pipes to handle each client
connections.
|
|
|
|
|
|
|
|
|
|
| |
This code creates a pipe between 2 GIOStream, the input side read from
the peer output side, and vice-versa.
In the following patches, this will avoid the socket communication
to exchange with the embedded webdav server.
glib-2.0 >= 2.43.90 because GSimpleIOStream dependency.
|
|
|
|
| |
Checking if URIs are being parsed and generated correctly.
|
|
|
|
|
|
|
|
|
| |
The examples below should be considered valid URIs:
e.g: spice://localhost?port=5900&tls-port=
e.g: spice://localhost?tls-port=&port=5900
This patch deals with arguments with empty value;
|
|
|
|
|
|
| |
XkbGetKeyboard does not work in XWayland (bfo#89240).
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=89105
|
|
|
|
|
|
|
|
|
|
|
| |
The server expects no connection_id during link time, in order to
realize a full reconnection.
The alternative would be to assume that the destination server has the
exact same channels and attempt to recreate and to reconnect them one by
one. However, if the destination is slightly different (say,
configuration or order of channels differs), this will likely fail. It's
best to start with a new session without prior knowledge.
|
|
|
|
|
| |
This virtual method turns out to be unnecessary anymore, and
was never override. channel_reset() is enough.
|
|
|
|
|
|
| |
It's unnecessary to call channel_disconnect() to finish the coroutine
and disconnect. Use c->has_error instead, like the rest of channel error
code.
|
|
|
|
|
|
| |
channel_disconnect() virtual method isn't overloaded by any
channel, and can be replaced by the equivalent channel_reset()
when finishing the coroutine.
|
|
|
|
|
|
| |
channel_reset() is called in channel_disconnect(). We can just move that
state change in channel_reset() in order to get rid of
channel_disconnect().
|
|
|
|
|
|
|
|
|
|
| |
Switching for migration reason is similar to a reconnection during
initial connection.
A notable difference is that new code path doesn't schedule a
delayed_unref callback. This is fine since the channel is still running
and delayed_unref is mainly used for signaling disconnections and none
should be emitted when switching.
|
|
|
|
|
|
| |
After coroutine has exited, reset channel state to unconnected,
this allows recycling a channel for reconnection, even in "normal"
disconnect/reconnect cases.
|
|
|
|
|
|
| |
This precondition isn't useful, since the channel is already
dereferenced before, and I've never seen an idle callback not passing
the user_data correctly.
|
|
|
|
|
|
| |
Move signaling of closed channel after the coroutine has exited in
delayed_unref callback, similarly to error events, so it's easier to
schedule reconnect since coroutine has terminated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
channel-port.h includes spice-client.h, that includes channel-webdav.h,
that includes channel-port.h again. It's enough if channel-port.h
includes spice-channel.h
Without this change, if one tries to build a source file which only
includes spice-port.h, the build fails with:
In file included from /usr/include/spice-client-glib-2.0/spice-client.h:46:0,
from /usr/include/spice-client-glib-2.0/channel-port.h:22,
from ./port.c:1:
/usr/include/spice-client-glib-2.0/channel-webdav.h:44:5: error: unknown type name 'SpicePortChannel'
SpicePortChannel parent;
^
/usr/include/spice-client-glib-2.0/channel-webdav.h:58:5: error: unknown type name 'SpicePortChannelClass'
SpicePortChannelClass parent_class;
|
|
|
|
|
| |
Silences the runtime warning in virt-viewer and gnome-boxes (bgo#744432):
Gtk-CRITICAL **: gtk_widget_queue_draw_area: assertion 'width >= 0' failed
|
|
|
|
|
| |
Keys should be sent to the guest if the widget has the focus even
when the keyboard grab is released.
|
|
|
|
|
| |
Trivial fix for 6163828e8cb15d539c80cc3f0bfb5008be9b2247:
Channel should be created if the shared-dir property is set.
|