summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-02-11configure: Check whether use GTLsgtlsPavel Grunt1-0/+7
2015-02-06webdav: fix checking for shared directory propertyMarc-André Lureau1-1/+1
Trivial fix for 6163828e8cb15d539c80cc3f0bfb5008be9b2247: Channel should be created if the shared-dir property is set.
2015-02-06Don't build libspice-client-gtk if configured --without-gtkBenjamin Gilbert4-11/+32
libspice-client-glib is useful as a client library on platforms that don't support GTK.
2015-02-06Update git submoduleChristophe Fergeau1-0/+0
This fixes build with mingw as well as lz4 support: 3aad79d LZ4: Do not include arpa/inet.h in Windows builds 9287e53 LZ4: Add support for 24bit pixman surfaces d167e2e LZ4: Fix the row alignment when it is not on a 32bit boundary f76fc28 LZ4: Decode the image format from the stream 83c0d64 LZ4: Adjust reading the top_down flag 6049db4 LZ4: Fix output buffer size ac26fd7 Remove redundant #if defined(SW_CANVAS_CACHE) || defined(SW_CANVAS_IMAGE_CACHE) 062bf67 Remove unused 'invers' arg from canvas_get_* 619b995 common: fix build with mingw 862b9b1 build-sys: Move pixman check to m4 macro 137b1a5 build-sys: Move opengl check to m4 macro f9e0a64 build-sys: Move opus check to m4 macro dd57d05 build-sys: Move celt check to m4 macro fb3fe22 build-sys: Move smartcard check to m4 macro df74a17 build-sys: Move posix checks to a separate m4 macro 2f1ba3b build-sys: Add fallback for AS_VAR_APPEND 2195369 build-sys: Small cleanup of AM_CPPFLAGS ed873a9 build-sys: Remove unused WITH_SMARTCARD conditional 2da14b6 build-sys: Remove unused win32 check 5bfa9ca build-sys: Remove unused X check 268d3e3 Remove unused header file
2015-01-29Don't set SpiceSession::cmain twice during migrationChristophe Fergeau1-2/+1
During migration, migrate_connect() ends with: spice_session_set_main_channel(mig->session, migrate_channel_connect(mig, SPICE_CHANNEL_MAIN, 0)); migrate_channel_connect() calls spice_channel_new() which will create a new SpiceMainChannel instance. spice_channel_constructed() will be called during this instanciation, which will call spice_session_channel_new(), which will set SpiceSession::cmain for SpiceMainChannel instances. When calling spice_session_set_main_channel(), SpiceSession::cmain will thus already be set, which causes a runtime warning as spice_session_set_main_channel() has a precondition checking that SpiceSession::cmain is not set already. This commit removes the call to spice_session_set_main_channel() from migrate_connect() as this call is not doing anything more than the call to migrate_channel_connect().
2015-01-29Remove runtime warning when setting a NULL shared-dirChristophe Fergeau1-1/+0
Now that the webdav channel can cope with a NULL shared dir (by not creating the webdav server), we no longer need to reject NULL shared directories with a warning. This fixes part of https://bugzilla.redhat.com/show_bug.cgi?id=1175721
2015-01-29webdav: Cope with NULL SpiceSession::shared-dirChristophe Fergeau2-2/+11
shared-dir default value is g_get_user_special_dir(G_USER_DIRECTORY_PUBLIC_SHARE) which can be NULL (for example if ~/.config/user-dirs.dirs does not exist). This commit makes sure we don't create a PhodavServer when this occurs
2015-01-29display: Fix 'exisiting' typo in debug logChristophe Fergeau1-1/+1
2015-01-29display: s/dropin/dropping in debug messageChristophe Fergeau1-1/+1
2015-01-29session: Add more debugging logsChristophe Fergeau1-5/+14
Initial SPICE connection can sometimes fail without clear indications where/how it failed. This commit adds more debug logs/more accurate logs in order to help narrow down such issues.
2015-01-29display: Improve DisplayChannel::num_drops_on_arive nameChristophe Fergeau2-6/+6
'arive' has a typo, and 'num_drops_on_receive' is clearer.
2015-01-29Use macro to swap data in spice_session_start_migrating()Christophe Fergeau1-16/+14
spice_session_start_migrating() swaps connection details between 2 SpiceSession instances. Instead of doing it manually, use a macro to do it for us.
2015-01-29desktop-integration: check owner of bus namePavel Grunt1-0/+7
It avoids calling D-Bus methods when the bus name "org.gnome.SessionManager" does not exist. Silences: GSpice-WARNING **: Error calling 'org.gnome.SessionManager.Inhibit': GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
2015-01-27spicy: deal with spice+unix:// URIMarc-André Lureau1-5/+11
2015-01-27session: teach spice_uri_create() about UNIX pathMarc-André Lureau1-1/+3
2015-01-27session: prettify query parametersMarc-André Lureau1-2/+2
Use & as parameters separators, this is more usual. Remove trailing one, no further parameters are useful anyway.
2015-01-27session: return allocated string from spice_uri_create()Marc-André Lureau1-14/+17
This allows more flexible string building.
2015-01-27session: parse spice+unix:// URIMarc-André Lureau1-1/+11
2015-01-27session: connect to UNIX pathMarc-André Lureau1-16/+40
2015-01-27session: add unix-path propertyMarc-André Lureau1-1/+34
2015-01-27channel: reset connection state on errorMarc-André Lureau1-0/+1
Fix regression introduced in 6b475802, to permit reconnection on error, the channel state must be < STATE_CONNECTING. Since the error is reported after coroutine exits and channel is reset, the state can be modified before throwing the error now.
2015-01-27channel: reset tls state when client calls connectMarc-André Lureau1-5/+7
The channel TLS state is kept during disconnection and reset, for automatic reconnection and migrations reasons. However, when spice_channel_connect() is called by client, it should first try non-TLS connection.
2015-01-27channel: delay event report to after coroutine exitMarc-André Lureau2-20/+24
Move to a common place error reporting, after the coroutine exits.
2015-01-23spice-widget: Don't return early from focus_in_event when widget is not realizedPavel Grunt1-4/+3
Otherwise SpiceDisplay might not get the keyboard grab. It also silence GSpice-CRITICAL on focus out event: GSpice-CRITICAL **: spice_gtk_session_request_auto_usbredir: assertion 's->auto_usbredir_reqs > 0' failed
2015-01-16session: Improved docs for spice_session_connect()Zeeshan Ali (Khattak)1-1/+9
Make it clear that users of this function must provide additional sockets for individual channels.
2015-01-08inputs: Correct documentation of scancode argumentsBenjamin Gilbert1-5/+8
AT scancodes" implies AT set 2, but the SPICE protocol expects AT set 1. spice-gtk additionally expects a mangled version of set 1 scancodes, which are then unmangled by spice_make_scancode()
2015-01-06README: update gstreamer infoFabiano Fidêncio1-2/+2
2015-01-06nsis: drop gst-0.10 in favour of gst-1.0Fabiano Fidêncio1-64/+53
Based on Victor Toso's patch for virt-viewer: https://git.fedorahosted.org/cgit/virt-viewer.git/commit/?id=3bbf1ded1cb01429d600b11035d5fb0d60bfe20b
2015-01-06audio: drop gst-0.10 in favour of gst-1.0Fabiano Fidêncio3-66/+7
As gstreamer-1,0 support was introduced by commit d4d60c97 and it works pretty much as gstreamer-0,10 used to work (tests were made both on Linux and Windows clients), let's drop the old gstreamer-0.10 support in favour of gstreamer-1.0.
2014-12-22usbredir: prevent crash when calling without hostMarc-André Lureau1-0/+3
Quite annoyingly, usbredir doesn't have public functions arguments preconditions, and will weirdly run the flush callback during initialization. With 201a8c2 change, the channel state is kept as it is when calling reset. This will result in the following crash that was avoided before thanks to a precondition on the channel to be ready. Adding a further precondition check on priv->host != NULL solves the following crash during reset(): Program received signal SIGSEGV, Segmentation fault. usbredirhost_write_guest_data (host=0x0) at usbredirhost.c:868 868 return usbredirparser_do_write(host->parser); (gdb) bt #0 0x00007fffb2ed24d0 in usbredirhost_write_guest_data (host=0x0) at #usbredirhost.c:868 #1 0x00007fffc81d463b in #usbredir_write_flush_callback (user_data=0x2d95250) at #channel-usbredir.c:469 #2 0x00007fffb2ed23f9 in usbredirhost_open_full (usb_ctx=0x2baba70, #usb_dev_handle=0x0, log_func=<optimized out>, #read_guest_data_func=0x7fffc81d482c <usbredir_read_callback>, #write_guest_data_func=0x7fffc81d4952 <usbredir_write_callback>, #flush_writes_func=0x7fffc81d45c3 <usbredir_write_flush_callback>, #alloc_lock_func=0x7fffc81d49f1 <usbredir_alloc_lock>, #lock_func=0x7fffc81d4a41 <usbredir_lock_lock>, #unlock_func=0x7fffc81d4a86 <usbredir_unlock_lock>, #free_lock_func=0x7fffc81d4acb <usbredir_free_lock>, #func_priv=0x2d95250, version=0x7fffc8283dcf "spice-gtk #0.27.7-89db-dirty", verbose=4, flags=1) at usbredirhost.c:748 #3 0x00007fffc81d3b22 in #spice_usbredir_channel_set_context (channel=0x2d95250 #[SpiceUsbredirChannel], context=0x2baba70) at channel-usbredir.c:212 #4 0x00007fffc81d37a9 in spice_usbredir_channel_reset (c=0x2d95250 #[SpiceUsbredirChannel], migrating=0) at channel-usbredir.c:125 #5 0x00007fffc81b7f8d in spice_channel_reset (channel=0x2d95250 [SpiceUsbredirChannel], migrating=0) at spice-channel.c:2688 #6 0x00007fffc81b8057 in channel_disconnect (channel=0x2d95250 [SpiceUsbredirChannel]) at spice-channel.c:2706 #7 0x00007fffc81b7559 in spice_channel_coroutine (data=0x2d95250) at spice-channel.c:2490
2014-12-16channel: clear channel error after auth errorMarc-André Lureau1-1/+3
When entered authentication details are wrong, spice-gtk will reset channel error, which will result in the following warning: (remote-viewer:20753): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. Clear channel error after reporting authentication error.
2014-12-16channel: throw auth error when coroutine endsMarc-André Lureau1-3/+4
It is common that clients attempt to reconnect during the SPICE_CHANNEL_ERROR_AUTH callback. However, the channel must exit the coroutine first before reconnection can happen.
2014-12-16channel: introduce SPICE_CHANNEL_STATE_RECONNECTINGMarc-André Lureau2-11/+9
Add a new state that permits reconnection, because it's < CONNECTING. It also simplifies some code by removing unneeded variables in spice_channel_coroutine(): the channel.tls and session.protocol version properties are already modified during initial connection steps.
2014-12-16channel: do not enter channel iterate on early errorMarc-André Lureau1-15/+17
There is no need to enter channel_iterate() if we found an early connection steps error.
2014-12-16channel: factorize failed authenticationMarc-André Lureau2-29/+34
There are a few things that should be common to all wrong authentication cases. Let's put them all in the same function.
2014-12-16session: keep main channel on reconnectMarc-André Lureau1-13/+17
For legacy reasons, spice-gtk should keep at least one channel in the session when reconnecting (clients may decide that the session is disconnected when all channels are gone). The most obvious is to keep and reuse the main channel.
2014-12-11Prepare 0.27 releaseMarc-André Lureau1-0/+19
2014-12-11docs: improvements for 0.27 releaseMarc-André Lureau2-1/+2
2014-12-06build-sys: update git.mkMarc-André Lureau1-22/+122
2014-12-03Fix build for glib < 2.32Marc-André Lureau1-1/+1
G_SOURCE_REMOVE was introduced in 2.32
2014-12-02Add LZ4 compression algorithm support.Javier Celaya4-0/+19
- Use PKG_CHECK_MODULES to find liblz4. - Set LZ4 display channel capability.
2014-12-01usb: keep USB context alive as long as channels existMarc-André Lureau1-0/+8
It was assumed the session would remain alive as long as channel existed, so USB context would be valid too. Now that channels are removed from session, USB context may be destroyed before channels. This produces invalid read/write on USB context. Make sure the context is alive as long as USB channels are by adding a reference on USB manager. ==6939== Invalid write of size 4 ==6939== at 0x394B604482: libusb_set_debug (core.c:1850) ==6939== by 0x3953A063D5: usbredirhost_open_full (usbredirhost.c:741) ==6939== by 0x4EC7E2F: spice_usbredir_channel_set_context (channel-usbredir.c:212) ==6939== by 0x4EC7AB6: spice_usbredir_channel_reset (channel-usbredir.c:125) ==6939== by 0x4EACCDC: spice_channel_reset (spice-channel.c:2621) ==6939== by 0x4EACDB4: channel_disconnect (spice-channel.c:2640) ==6939== by 0x4EAC28F: spice_channel_coroutine (spice-channel.c:2423) ==6939== by 0x4EE8B1C: coroutine_trampoline (coroutine_ucontext.c:63) ==6939== by 0x4EE87D6: continuation_trampoline (continuation.c:55) ==6939== by 0x3928247FEF: ??? (in /usr/lib64/libc-2.20.so) ==6939== by 0x51E36FF: ??? (in /usr/local/stow/spice-gtk/lib/libspice-client-glib-2.0.so.8.5.0) ==6939== by 0xCF0C18F: ??? ==6939== Address 0xff15f90 is 0 bytes inside a block of size 536 free'd ==6939== at 0x4A07CE9: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==6939== by 0x394B606466: libusb_exit (core.c:2041) ==6939== by 0x4ECC590: spice_usb_device_manager_finalize (usb-device-manager.c:371)
2014-12-01usb: return early if channel is not usbMarc-André Lureau1-9/+12
Return early if channel is not USB, replace: if (SPICE_IS_USBREDIR_CHANNEL(channel)) { /* code */ } with if (!SPICE_IS_USBREDIR_CHANNEL(channel)) return;
2014-12-01session: disconnect in idleMarc-André Lureau1-28/+46
This is a workaround for existing clients such as virt-viewer that do not hold a reference to their sessions when calling spice_session_disconnect() and crash now that channels are removed from session during the call. They expect disconnection events to be deferred instead, let's defer actual disconnection to idle time for public disconnect API for compatibility reasons (it is still recommended to fix client code, for eventual future iterations)
2014-12-01session: keep a reference on disconnectMarc-André Lureau1-0/+2
It is idiomatic for client code to clean up its reference on channel disconnection. Keeping a reference during disconnect helps solving potential crashes if the session is unref'ed during callbacks.
2014-12-01session: remove sticky disconnecting flagMarc-André Lureau1-4/+3
This used to help prevent double-unref when channel were considered part of the session as long as they lived. Now it shouldn't be required anymore
2014-12-01channel: deprecate spice_channel_destroy()Marc-André Lureau3-6/+11
This function is somewhat useless, and dangerous since it is calling g_object_unref() behind your back (although this is mentioned in the doc, I consider this a bad practice).
2014-12-01display: don't reschedule stream if disconnected from sessionMarc-André Lureau1-2/+3
Avoid the following critical when a channel is disconnected with a pending stream (the streams are cleared on channel reset, after coroutine exit) (process:17188): GSpice-CRITICAL **: spice_session_get_mm_time: assertion 'session != NULL' failed #0 0x00007ffff71c24e5 in spice_session_get_mm_time (session=0x0) at spice-session.c:1999 #1 0x00007ffff71d438c in display_stream_schedule (st=0xa33040) at channel-display.c:1014 #2 0x00007ffff71d4a09 in display_stream_render (st=0xa33040, st@entry=<error reading variable: value has been optimized out>) at channel-display.c:1165 #3 0x0000003e1944a553 in g_timeout_dispatch (source=0xad64e0, callback=<optimized out>, user_data=<optimized out>) at gmain.c:4520 #4 0x0000003e19449aeb in g_main_context_dispatch (context=0x6a32b0) at gmain.c:3111 #5 0x0000003e19449aeb in g_main_context_dispatch (context=context@entry=0x6a32b0) at gmain.c:3710 #6 0x0000003e19449e88 in g_main_context_iterate (context=0x6a32b0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781 #7 0x0000003e1944a1b2 in g_main_loop_run (loop=0x97e200) at gmain.c:3975 #8 0x0000003e1c9ebb35 in gtk_main () at gtkmain.c:1207 #9 0x0000000000430185 in main (argc=1, argv=0x7fffffffdcb8) at virt-viewer-main.c:119
2014-12-01session: remove channels on disconnectMarc-André Lureau3-10/+12
A channel is considered to be part of a session as long as it is alive. However, this model is problematic, since library user may hold channel references, and thus the channel will remain in the session. Calling spice_session_disconnect() several time will end up calling spice_channel_destroy(), releasing references that aren't owned by the session. This usually causes crashes, in particular with language bindings that do not deal well with a library model where objects can't be referenced at will.
2014-12-01session: move SpiceSessionPrivate out of headersMarc-André Lureau2-82/+84
Make sure none of the SpiceSessionPrivate fields are accessed directly anymore