Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
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.
|
|
Make sure none of the SpiceSessionPrivate fields are accessed directly anymore
|
|
Use GObject object association for session helpers.
GtkSession and DesktopIntegration are in the gtk library SpiceSession is
in glib one. So far we had the SessionPriv structure shared between the
two libraries, so they could fit their pointers there. But this is no
longer possible when moving the private structure in .c. We could add
more accessors, but they would need to be in public API, and this isn't
supposed to be accessed by API users.
|
|
Use session accessors to initialize the webdav server
|
|
|
|
Avoid dereferencing session private data directly, and use accessors
instead.
|
|
|
|
|
|
Track the migration session earlier, so that disconnecting before
migration finished will abort and release it.
|
|
|
|
Now that upstream provides a stable/versioned API, it will be
easier to deal with than with submodules.
|
|
Allow to specify the shared directory from the command line, or at
runtime via properties. (still default to xdg public share, if none
specified)
|
|
See spice-common for protocol details. phodav, a webdav server library,
is imported thanks to a submodule, until this project has a stable API
and releases.
The webdav channel is reponsible for handling port events and
multiplexing the request streams. Extra care has been made to avoid
blocking and to enable some fairness between concurrent streams, however
this has been particularly tricky and is likely to have some issues
left.
The webdav server is run in a seperate thread, using libsoup. The client
communication is done via a local tcp socket, but protected to only
accept local connection and with a pretty strong password.
The home directory is exported for the remote to browse, which seems to
be a sensible default atm.
|
|
Add a function to retrieve the last GError from a channel, this may be
useful to provide additional error details to the client.
|
|
Generalize a little bit SpiceProxy to allow easy URI manipulation by
clients.
|
|
As pointed out by Yonit on the ML:
> (1) the palette cache shouldn't be shared among the display channels. I.e.,
> there should be one instance per channel, and not one instance in
> spice-session.
|
|
The cache code isn't very quick, it shows up in profilers. Using
GHashTable allows to simplify the code while making it faster.
|
|
|
|
Support checking whether an audio playback is active and what its latency
is.
|
|
|
|
|
|
There has been reports of recent spice-gtk versions not working on
RHEL6 or Ubuntu 10.04. This happens because these systems have
an older glib version without:
commit a0e1b226a21ca498b301981b0c89e89ad9a31eb1
Author: Dan Winship <danw@gnome.org>
Date: Fri Apr 23 08:47:18 2010 -0400
GSocketConnection: don't close the socket if it's still reffed
When disposing a GSocketConnection, don't explicitly close the
underlying GSocket. The GSocket will close itself if it gets
destroyed, and if it doesn't get destroyed, that presumably means the
app still wants to use it. Eg, this lets you use GSocketClient to
create a GSocketConnection, and then take the GSocket and destroy the
GSocketConnection.
https://bugzilla.gnome.org/show_bug.cgi?id=616855
and spice-gtk commit 0f9a432c "session: allow to connect via HTTP CONNECT
proxy" changed spice_session_channel_open_host to get its socket by doing:
open_host->socket = g_socket_connection_get_socket(connection);
g_object_ref(open_host->socket);
g_object_unref(connection);
(see socket_client_connect_ready)
If glib does not have the commit mentioned above, then this won't
work as expected as open_host->socket will get closed when 'connection'
gets destroyed.
This commit changes spice_session_channel_open_host to return a
GSocketConnection rather than a GSocket so that we can keep the
socket open even on older glib versions.
Huge thanks go to Brad Campbell <brad@fnarfbargle.com> for doing all the
spice-gtk/glib bisecting work.
|
|
|
|
|
|
During migration, the smartcard channel that belongs to the temporary
copied session shouldn't be active.
|
|
When swapping the src and dest channels's, we need to keep
the xmit_queue and msg serials. Their state is expected to stay the same
after migration.
|
|
We need to integrate closely with the desktop environment of the user in
several cases. Some examples are disabling auto-mounting when auto-usbredir
is active (rhbz#812972), and disabling the screensaver when fullscreen
(fdo#34793).
Unfortuntely these kinds of things require desktop environment specific
handling. Therefor this patch introduces a desktop-integration helper class,
which is to server as a container for all sort of desktop environment specific
functions.
For now it just supports disabling automounting under Gnome, but this will be
extended in the future.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Allows a client to identify the server it is connected to.
|
|
Set the default sizes to be the same as in the old linux spice client.
cache_size=20M pixels (instead of 32M), window_size=8M pixels for a 64MB
dev ram (instead of 16M pixels).
|
|
Use the common g_coroutine_socket_wait()
https://bugs.freedesktop.org/show_bug.cgi?id=44570
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=44179
|
|
Yonit Halperin described the flow, that I followed:
(1) when client_migrate_info is called SPICE_MSG_MAIN_MIGRATE_BEGIN is
sent to the client.
Then, the client should link to the target server (SpiceLinkMess),
i.e., connect all the channels, but it shouldn't poll from the target,
only from the source. You can refer to RedClient::Migrate class. The
connection id in the link message should be the id of the connection
to the source server.
(2) The client sends to the source server
SPICE_MSGC_MAIN_MIGRATE_(CONNECTED|CONNECT_ERROR)
(3) When migration completes SPICE_MSG_MAIN_MIGRATE_(END|CANCEL) is
sent to the client.
(3.1) In case of SPICE_MSG_MAIN_MIGRATE_CANCEL, the client closes the
connections to the target.
(3.2) In case of SPICE_MSG_MAIN_MIGRATE_END, the client should reset
all the data that is related to the connection to the source and
complete the transition to the target server (without sending
ATTACH_CHANNELS, and without guest display initialization via agent).
Then, the client sends SPICE_MSG_MAIN_MIGRATE_END to the target.
|
|
It is useful to have a way to prevent sending commands in read-only
sessions (think of multi-client)
No clipboard sharing allowed in this case in gtk-session.
|
|
The usb acl helper asks policykit, which may want to interact with the
user through the policykit agent, which wants to grab the keyboard, if
we then have the keyboard grabbed, the agent says authentication has failed,
policykit rejects the helper opening up the acl and usbredir won't work.
Unfortunately the only way to work around this is to temporarily release our
own keyboard grab, not pretty but as discussed on irc, this is the "best"
solution.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
This is not really clean, as it may conflict with client usage
|
|
Otherwise they cannot be included unless other headers are included
first (and in the right order).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A light copy constructor for migration.
|
|
|
|
|
|
|
|
|