| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
TODO:
- mingw
- adapt to SSH_AUTH_SOCK
- write a proper commit message
|
|
|
|
|
|
|
|
|
| |
spice_marshaller_flush must be called before writing a message to
calculate pointer offsets.
This is only an issue when ptr submarshallers are used, which currently
is only used by Tunnel::service_add. Since this is disabled by default,
this buug is not going to be hit by the current codebase.
|
|
|
|
|
| |
When the GStreamer backend is used, HAVE_GSTAUDIO is defined, not
HAVE_GST_AUDIO.
|
|
|
|
|
|
|
|
| |
e0c2182937 dropped some #include from channel-smartcard.c and spicy.c as
they were redundant with the headers already included from
spice-common/common/messages.h. While this is true for the newer
libcacard.h header, we need to include more headers to support older
libcacard, or compilation breaks.
|
|
|
|
|
|
|
| |
gst_init() will terminate the program in case of a failure so it's
better to use gst_init_check() so we can recover from errors.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|
|
|
|
|
|
|
|
| |
Their absence should not be reported as an error since they are not
needed for the build, but the developer will need them to test the code
so it's appropriate to warn him.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|
|
|
|
| |
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|
|
|
|
|
|
|
|
|
|
| |
Rather than GStreamer/PulseAudio backend being mutually exclusive at
compile-time, this commit allows to enable both at the same time.
PulseAudio will then be favoured, with a fallback to GStreamer if it's
not available.
Note that --with-audio is kept for backward compatibility.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|
|
|
|
|
|
| |
Drop unneeded includes (that are already undirectly included).
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
|
|
|
|
|
|
| |
Remove gtkrc too, and cleanup EXTRA_DIST ($(desktop_in_files) is unused)
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
|
|
|
|
| |
For new libcacard.h usage
|
|
|
|
|
|
|
|
| |
"path" points to "uri" memory, move free(uri) later.
Found thanks to valgrind :)
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The next commit is going to use SPICE_WARNING which was added recently
to spice-common
This submodule update changes:
Christophe Fergeau (5):
build-sys: Add gio-2.0 to SPICE_CHECK_GLIB2
build-sys: Fix error in SPICE_CHECK_LZ4 description
build-sys: Set automake conditional in SPICE_CHECK_SMARTCARD
build-sys: Rename SUPPORT_GL to HAVE_GL
build-sys: Add missing # to comment
Francois Gouget (3):
build-sys: Add the SPICE_WARNING() and SPICE_PRINT_MESSAGES m4 macros
build-sys: Add SPICE_CHECK_GSTREAMER()
build-sys: Add SPICE_CHECK_GSTREAMER_ELEMENTS()
Lukas Venhoda (4):
ssl-verify: Only check addr length when using IP addr
m4: Require glib version >= 2.22
ssl-verify: Changed IPv4 hostname to IPv6
canvas_base: Remove redundant switch case block
|
|
|
|
| |
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|
|
|
|
|
|
|
|
| |
This lets us avoid naming conflicts when using GStreamer for other
purposes.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Victor Toso <victortoso@redhat.com>
|
|
|
|
|
|
|
|
|
| |
When a user cancel's a file transfer, we should send a STATUS_CANCELED
message rather than an STATUS_ERROR message. The latter triggers a bug
in the vdagent where the file remains opened by the vdagent in the guest
and cannot be removed.
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
|
|
|
| |
This patch adds SPICE_CLIENT_ERROR_AUTH_NEEDS_USERNAME error
for the case when authentication fails because of missing username.
This can happen when GSSAPI method is used.
https://bugs.freedesktop.org/show_bug.cgi?id=92994
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent changes to file transfer introduced a regression where the client
would crash when rebooting a guest after performing a file transfer.
This was caused because the SpiceFileTransferTask is freed when it is
completed, but is not removed from the MainChannel's hash table. When we
reboot the guest and lose our vdagent connection, we iterate through the
list of tasks in the hash table and complete them. But since we did not
remove the already-completed tasks from this hash table, this hash table
contains already-freed memory.
To fix the issue, take an extra ref for the async operations (so that
completing the task won't free an object that is stored in the hash table). In
addition, connect to the task's "finished" signal and remove it from the hash
table when it becomes finished.
Bug reported via email by Jay.han <ezzzehxx@gmail.com>. Valgrind report
below:
==6926== Invalid read of size 8
==6926== at 0x508177B: spice_file_transfer_task_completed (channel-main.c:2941)
==6926== by 0x50846DC: set_agent_connected (channel-main.c:462)
==6926== by 0x5073A43: spice_channel_recv_msg (spice-channel.c:1892)
==6926== by 0x5073BE3: spice_channel_iterate_read (spice-channel.c:2132)
==6926== by 0x5075D25: spice_channel_coroutine (spice-channel.c:2170)
==6926== by 0x50A6EFE: coroutine_trampoline (coroutine_ucontext.c:63)
==6926== by 0x50A6CC8: continuation_trampoline (continuation.c:55)
==6926== by 0x65C2B5F: ??? (in /lib/x86_64-linux-gnu/libc-2.19.so)
==6926== by 0x151331C7: ???
==6926== Address 0x29971fd8 is 168 bytes inside a block of size 184 free'd
==6926== at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6926== by 0x5E33142: g_type_free_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4000.0)
==6926== by 0x50815DA: file_xfer_close_cb (channel-main.c:1826)
==6926== by 0x5AEBD5C: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4000.0)
==6926== by 0x5B0F41A: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4000.0)
==6926== by 0x5B0F438: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4000.0)
==6926== by 0x609BCE4: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==6926== by 0x609C047: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==6926== by 0x609C309: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==6926== by 0x4058AB: main (spicy.c:1858)
|
|
|
|
|
| |
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
|
|
| |
*data must always be set to NULL on error.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When channel wants to send much more data then the wire can handle, the
queue grows fast. This patch does not limit the queue growth but
introduces an internal API to check if queue size is too big.
This internal API is used in usbredir_buffered_output_size_callback
which is called before any isoc pacaket is queued in usbredir. The
usbredir implements the logic to:
- only drop isoc packets
- while dropping packtes does still give us video frames from and above
10fps streams
An easy way to test locally is sharing and webcam and with tc:
tc qdisc add dev lo root netem delay 100ms
tc qdisc change dev lo root netem delay 1000ms
tc qdisc del dev lo root netem
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1264156
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit updates spice-common to latest git master.
Since the argument to the SPICE_CHECK_xxx macros is now unused, it's
cleaner to remove it.
Christophe Fergeau (3):
Add marshaller test case
build-sys: Use ${PKG_CONFIG} rather than pkg-config
build-sys: Rework SPICE_CHECK_* m4 macros
Frediano Ziglio (1):
common: Fix typo in comment
Javier Celaya (1):
Fix linearization of several marshallers with one item
|
|
|
|
|
| |
This isn't terribly useful for general debugging and makes the log
pretty noisy when transferring large files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In certain circumstances we were printing an error message even though
the file transfer had completed successfully. It didn't cause any
problems, but it pointed out an issue in the handling of outgoing agent
messages.
The described behavior was generally only encountered when there were multiple
files being transferred at once, and most often when one or two files were
significantly smaller than another file being transferred. For example, two
20kB files and another 3MB file. The failure mechanism is basically as follows:
For each file transfer, we read a chunk for the file and then we queue a series
of messages to the guest and wait for them to be flushed before continuing to
read a new chunk of the file. (Since the maximum agent message size is 2kB, each
64kB chunk of file being read can generate up to 32 messages at a time). The
file transfer task remains in "pending" state until the flush operation is
complete. Since all agent messages go into a single channel-wide queue, waiting
for the messages to be flushed meant waiting for *all* outgoing messages to be
flushed, including those that were queued after we called flush_async().
Since agent messages can only be sent if the client has enough agent tokens, it
can take a little while for all queued messages to be sent. This means that
even if a file transfer task has sent out all of its data to the guest, it can
be kept in "pending" state for some time if other file transfer tasks or other
agent messages are added to the queue. In this situation, The guest might
notice that it has received all of the data for a file transfer task and send a
XFER_STATUS_SUCCESS message while we're still in "pending" state.
This patch changes to code so that flush_async() only waits for the
currently-queued messages to be sent. This means that it is not affected by any
new messages that get added to the outgoing queue after we've called
flush_async(). This means that the task will exit "pending" state immediately
after sending out our last data packet.
Fixes: rhbz#1265562
|
|
|
|
|
|
|
|
| |
In order to avoid reference cycles, you're supposed to release
references in dispose, especially to those objects that can hold
references to yourself. This probably wasn't causing any leaks, since
the file transfer tasks generally are not alive when the main channel is
destroyed, but it's more proper.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the case where a file cannot be opened for reading, we were not
emitting a 'finished' signal to communicate the error to the client.
I was intending to further fix this issue by 'rejecting' the drop (in
SpiceDisplay) when the URI list contains invalid files (e.g.
directories). This would prevent a 'new-file-transfer' signal from even
being emitted for these invalid files. But this turns out to be not very
useful since there's no real feedback given to the user to indicate why
the drop failed. So it's probably better for client applications to get
the 'new-file-transfer' and 'finished' signals so that they can present
the error to the user to explain why the attempted transfer did not
work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise it will be leaked. There is no cache_ref function, or helper
increasing a refcount/taking a reference so cache_unref really is a
cache_free method.
This fixes:
==27687== 64 bytes in 4 blocks are definitely lost in loss record 250 of 435
==27687== at 0x4C28C50: malloc (vg_replace_malloc.c:299)
==27687== by 0xA6AF058: g_malloc (gmem.c:94)
==27687== by 0xA6C5982: g_slice_alloc (gslice.c:1007)
==27687== by 0x40F112: cache_new (spice-channel-cache.h:54)
==27687== by 0x40F112: cache_image_new (spice-channel-cache.h:64)
==27687== by 0x40F112: spice_session_init (spice-session.c:294)
==27687== by 0xA239B4A: g_type_create_instance (gtype.c:1870)
==27687== by 0xA21C31A: g_object_new_internal (gobject.c:1779)
==27687== by 0xA21DB10: g_object_newv (gobject.c:1926)
==27687== by 0xA21E3FB: g_object_new (gobject.c:1619)
==27687== by 0x40FF4D: spice_session_new (spice-session.c:1479)
==27687== by 0x40E678: test_session_uri (session.c:35)
==27687== by 0xA6CE47A: test_case_run (gtestutils.c:2158)
==27687== by 0xA6CE47A: g_test_run_suite_internal (gtestutils.c:2241)
==27687== by 0xA6CE642: g_test_run_suite_internal (gtestutils.c:2253)
|
|
|
|
|
|
|
|
|
|
| |
display_cache is no longer refcounted since commit c9d4773, but this is
not an issue as even before, the fact that it was refcounted was not
used as there was no corresponding cache_ref() call (and
g_hash_table_ref() was not called directly either).
As the next commit will free memory from cache_unref() rather than just
releasing a reference, it's better to make it obvious that this method
is a _free() method rather than an _unref() one.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were several shortcomings to the existing file transfer API,
particularly in terms of monitoring ongoing file transfers. The major
issue is that spice_main_file_copy_async() allows you to pass an array
of files, but the progress callback does not provide a way to
identify which file the callback is associated with. This makes it
nearly impossible for an application to monitor file transfers.
In addition, the SpiceDisplay widget automatically handles drag-and-drop
actions on the widget, and initiates file transfers without allowing the
application to specify a progress callback. So there's no way for an app
to monitor file transfers that are initiated via drag and drop.
http://lists.freedesktop.org/archives/spice-devel/2015-September/021931.html
has a more detailed explanation of the issues.
This change doesn't break the existing API, but adds some new API that
will allow an application to monitor file transfer progress, even for
transfers that are initiated within spice-gtk itself.
- A new public SpiceFileTransferTask object is added.
- The SpiceMainChannel object gains a "new-file-transfer" signal that is
emitted whenever a new file transfer is initiated. The
SpiceFileTransferTask object is passed to the signal handler.
- The application can retain this object and monitor its 'progress'
property to be notified when the progress of the file transfer
changes. The SpiceFileTransferTask::finished signal indicates when the
given file transfer has completed. The application can also cancel the
file transfer by calling the _cancel() method.
The 'spicy' test application has been updated to use this new API and
display a simple dialog showing the progress of individual files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
spice_main_file_copy_async() allows you to pass a NULL-terminated array
of files to transfer to the guest. It also allows you to pass a
progress_callback function to monitor the progress of the transfer, but
this progress callback is called separately for each file that is
transferred, and there are no parameters that allow the caller to
determine which file a given callback corresponds to. This makes it very
difficult to monitor the progress.
To make this more usable, I've changed it so that the progress callback
doesn't simply report the number of bytes read and total size of the
current file. Instead, we add up the status of all current transfers and
report that value to the callback.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only the local declarations should be declared extern "C", otherwise it
can result in unexpected errors such as this (encountered while re-ordering
some include statements for a different patch):
CC channel-inputs.lo
In file included from /usr/include/glib-2.0/glib/gmacros.h:38:0,
from /usr/lib64/glib-2.0/include/glibconfig.h:9,
from /usr/include/glib-2.0/glib/gtypes.h:32,
from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from /usr/include/glib-2.0/gobject/gbinding.h:28,
from /usr/include/glib-2.0/glib-object.h:23,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
from ../../src/spice-channel.h:27,
from ../../src/channel-inputs.h:25,
from ../../src/channel-inputs.c:20:
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stddef.h:147:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
typedef __PTRDIFF_TYPE__ ptrdiff_t;
^
|
|
|
|
|
|
| |
This header is the single include needed for all gtk-related
functionality, similar to spice-client.h. Generate a compiler warning if
a different header is included.
|
|
|
|
|
| |
Generate a compiler warning if an application attempts to include a
different header.
|
|
|
|
|
| |
'sources' should be a NULL-terminated array, but the parameter
documentation treats it as if it is a single file object.
|
| |
|
|
|
|
|
| |
Since these messages are only used for terminal debug output, let's not
waste time translating them.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Some translatable strings were added in commit 8c37a340.
|