| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently trying to view a usbredir enabled vm from virt-manager causes
virt-manager to crash. This crash is caused by the following happening:
-virt-manager sets up the session, including connecting all the channels
-a spice-gtk internal code path calls spice_usb_device_manager_get()
-spice_usb_device_manager_get calls channel_new on all already connected
usb channels
-channel_new does:
spice_usbredir_channel_set_context(SPICE_USBREDIR_CHANNEL(channel),
self->priv->context);
-But self->priv->context has not been set yet (so is NULL) -> segfault!
This patch fixes this by moving the iterating over already connected
usb channels to after the setting of self->priv->context. Note this means
that the channels will no longer get checked when there is no USB_REDIR
support. That is not a problem since spice_usb_device_manager_initable_init
will return FALSE in that case anyways.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
/usr/i686-w64-mingw32/sys-root/mingw/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function declaration isn't a prototype [-Werror=strict-prototypes]
|
|
|
|
| |
../common/lz.h:18:5: error: 'libintl_printf' is an unrecognized format function type [-Werror=format]
|
| |
|
|
|
|
|
|
| |
The code generator for the python binding generates code which
throws away const-ness on strings. Disable the -Wwrite-strings
warning to avoid failing on this auto-generated code.
|
|
|
|
|
| |
Use of 'hh' in the UUID format string is not required. Furthermore
it causes errors on Mingw32, where the 'hh' modifier is not supported
|
|
|
|
|
|
|
|
| |
When a goto statement jumps over a variable declaration with an
initializer, the state of that variable is undefined. Move the
declaration further up, so that the goto doesn't jump over it.
This lets the compiler then warn, if the goto jump results in
use of undefined values.
|
|
|
|
|
|
|
|
|
| |
A number of functions were used without prior declaration. In
some cases this was due to missing include files. In other cases
the functions should have just been static.
Ideally this would allow -Wmissing-declarations to be enabled, but
the files generated by spice_codegen.py will still trip up on this.
|
|
|
|
|
| |
* common/quic.c, common/rop3.c, common/sw_canvas.c,
gtk/spice-client-glib-usb-acl-helper.c: s/()/(void)/
|
|
|
|
|
|
|
|
|
|
|
| |
The usb-helper-acl.h header file duplicated some declarations
already present in usb-device-manager.h
The channel-display.c file declared the object init function
which is already done by the GObject helper macros
* gtk/channel-display.c: Remove duplicate decl of init function
* gtk/usb-acl-helper.h: Remove duplicate decls
|
|
|
|
|
|
|
| |
Arithmetic on void * pointers is undefined by the C standard.
Convert the one case of this to use guint8 instead.
* gtk/channel-main.c: s/void */guint8 */
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are some integer range checks which always evaluate false
due to use of unsigned integer types. One of these would prevent
detection of encoding errors from celt. The others are simply
no-ops.
* gtk/channel-record.c: Make 'frame_size' signed to allow detection
of celt encoding errors
* gtk/spicy.c: nkeys is an unsigned type, so checks for nkeys < 0 are bogus
* common/pixman_utils.c: SpiceROP is an enum & thus unsigned
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Various methods are deprecated by using the G_GNUC_DEPRECATED_FOR
macro. Unfortunately this macro was placed in the .c file impl,
instead of the .h file decl. Thus applications building against
SPICE-GTK would never see the deprecation warnings. At the same
time, building SPICE-GTK itself would trigger some of the warnings
preventing use of -Wdeprecated-declarations to detect use of
deprecated GTK functions.
The fix is in multiple parts
* Replace calls to G_GNUC_DEPRECATED_FOR with SPICE_DEPRECATED_FOR
* Move macros from .c to .h files
* Turn SPICE_DEPRECATED_FOR into a no-op if SPICE_NO_DEPRECATED
is defined
* Define SPICE_NO_DEPRECATED when building
|
|
|
|
|
|
|
| |
Some functions should be declared to take const char * instead
of plain char *. In other places we intentionally cast away
const-ness, so we should add explicit casts to stop compiler
warnings
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
When SASL auth failure happen, the Spice server disconnects the
client. Sadly, this is not easily distinguishable from an IO error.
However, since it happens during authentication phase it is better to
error out an authentication error.
|
|
|
|
|
|
| |
Those two g_critical() can happen when collecting credentials for the
first time. It is not something to be warned about, but merely useful
for debugging
|
|
|
|
|
|
| |
SPICE_MSGC_MAIN_MIGRATE_END was dropped because the main channel was
xmit_queue_blocked. When we swap the channels, we should also swap
xmit_queue.
|
|
|
|
|
|
| |
Since c2ba62666beaee526e1b4288f9bd66976ce780ef messages can be ignored
when a channel is reset. A warning can help explain why some messages
are dropped.
|
|
|
|
| |
Allows a client to identify the server it is connected to.
|
|
|
|
|
| |
By default, start a controller listener.
If ran with --menu, start a foreign-menu listener.
|
| |
|
| |
|
|
|
|
|
| |
In this case, a valid fd will be requested via the
SpiceChannel::open-fd signal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glib-compat.c was added to SPICE_GTK_SOURCES_COMMON since with the
new SpiceUsbDeviceWidget libspice-client-gtk now also uses G_TYPE_ERROR
and when compiling with an older glib this gets defined in glib-compat.o
However doing this turns out to be a very BAD idea, since having
glib-compat.o linked into 2 different libraries, each defining there
own private spice_error_get_type, leads to the "GError" type getting
registered twice with glib, which it does not like.
So instead of linking glib-compat into 2 different libraries, put it only
in libspice-client-glib and export spice_error_get_type from
libspice-client-glib (this is ofcourse intended for libspice-client-gtk
private use only).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
| |
Add a spice_usb_device_manager_can_redirect_device function and use this
in SpiceUsbDeviceWidget to check if redirection is available.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
And in general gnome-hig-ify usb-device-widget:
* Use spacing instead of padding so that there is no padding at the
outside/border of the widget, allowing the user to control the border size.
* Use multiple of 6 as spacing / indentation values
* Show the label left justified and bold, show the checkboxes (and the info
bar) 12 pixels indented from the label
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
| |
Rather then treating it as any other error. This avoids showing an error
dialog after the user pressed cancel in the policykit dialog.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
| |
|
|
|
|
|
|
|
|
| |
Unfortunately not all device makers go to the "trouble" of adding device
identification strings to a device's descriptors. This patch makes spice-gtk
translate vid/pid into strings if the device lacks the strings.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a anchor mouse position after every move, similar to spicec to
avoid reaching transparent border on the screen.
We try to move to the center of the screen, but
gdk_display_warp_pointer () will move the cursor within the grabbed
window (so it still receives mouse events even on Windows)
Tested with Linux and Windows clients.
Fixes bug: https://bugs.freedesktop.org/show_bug.cgi?id=45595
|
|
|
|
|
|
|
| |
Without keepalive on each connection(channel), channel is destroyed
after ip_conntrack_tcp_timeout_established timeout.
https://bugs.freedesktop.org/show_bug.cgi?id=45899
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, the BIO object used by openssl to read & write was using
the socket fd directly. But the mainloop integration is done with
GSocket.
On Windows, the read/write events are cleared after
g_socket_send()/receive() with private function
_win32_unset_event_mask. If the glib functions aren't cleared, glib
source will keep notifying of data available in or out. On Windows,
this causes a busy loop when doing SSL_read() for example (glib
POLL_IN data condition is reached and SSL_read() return needs data).
Instead, openssl should read/write using GSocket methods.
|
|
|
|
|
|
| |
If connecting to a UNIX domain socket, it is expected that the
setsockopt(TCP_NDELAY) call will fail with errno=ENOTSUP, so don't
issue a warning in that case
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a "zoom-level" property. Maintain the given scaling ratio when
scaling is enabled.
If scaling is disabled, this property is ignored.
For example at 50%, this allows to fit a 640x480 desktop in a 320x240
widget and when resizing it to 640x512 to have a 1280x1024 desktop.
(this feature is required by virt-viewer)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Factor out and simplify a little the code to allow easier addition of
zoom-level property.
The "set_display" parameter for recalc_geometry() seems to be useless,
since the code was apparently trying to set the guest to the given
d->width and d->height, but reseting it to the current value, which
cancel the effect.
We should fix the problem of setting the guest resolution at
display-init time in a follow-up patch since it probably never worked
with spice-gtk.
|