| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
| |
Check given display id is within the range of array.
Allows to be call with -1 to turn set all displays.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The windows are destroyed during non-semi-seamless migrations, but the
gtk session and connected handlers remains. When a property changes
again on it, it will signal a destroyed window and lead to a crash.
The signal handler should be disconnected when the window is
destroyed. Since we have N numbers of handlers, it's easier to use
spice_signal_connect_object() helper to handle this for us by turning
spice_window structure into a basic GObject.
That GObject code could be improved, but that wasn't the goal of this
patch.
|
|
|
|
|
|
|
|
|
| |
The main channel only relied on
VD_AGENT_DISPLAY_CONFIG_FLAG_SET_COLOR_DEPTH to set color depth when
connecting to a guest. However, that doesn't seem to be
enough. Instead send given color depth with monitor configuration.
Fix --spice-color-depth option not "apparently" working.
|
|
|
|
| |
This is going to make life easier for stow users, including myself.
|
|
|
|
| |
Using GMutex as a static mutex is only possible since 2.32.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
It used to be below, then was moved on top of all, but now it's
defined in config.h. Hopefully below config.h is the right
place. config.h should never have direct includes anyway.
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly so that they don't turn into errors when building from source:
-Wno-missing-field-initializers:
Because this has to be close to the most stupid warning gcc has ever produced
-Wno-deprecated-declarations
Because we use some deprecated functions to avoid #ifdef hell while maintaining
compat with older gtk / glib versions
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GNULIB has a helpful module 'manywarnings' which makes it easy
to turn on every single GCC warning. The general goal is that
every possible GCC warning should be enabled, except for certain
blacklisted warnings.
This imports the GNULIB m4 macros, and updates configure.ac to
use this new capability. As & when new GCC warnings are created,
the 'manywarnings.m4' can be refreshed from upstream GNULIB
* m4/manywarnings.m4, m4/warnings.m4: GNULIB warning macros
* configure.ac: Remove custom compiler warning checks
* m4/spice-compile-warnings.m4: Decide what GCC warnings to enable
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* common/quic.h, common/rop3.h, common/sw_canvas.h: s/()/(void)/
|
|
|
|
|
|
|
|
|
| |
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)/
|
|
|
|
|
|
|
|
|
|
| |
To allow the compile to detect incorrect printf formats, any
var-args function should have a format annotation
* common/macros.h: Helper to define ATTR_PRINTF for code
which can't depend on glib
* common/canvas_base.c, common/lz.h, common/macros.h: Annotate
some var-args methods
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add extra {} braces around if/else statements which only
call SPICE_DEBUG to avoid:
../common/ssl_verify.c: In function 'verify_pubkey':
../common/ssl_verify.c:87:50: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
../common/ssl_verify.c: In function 'verify_hostname':
../common/ssl_verify.c:254:53: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
../common/ssl_verify.c: In function 'verify_subject':
../common/ssl_verify.c:381:41: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Fix a case of 'static int inline' to be 'static inline int'
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
gtk-doc.make is created by autogen.sh, therefore it should
not be deleted in distclean, only maintainerclean
|
| |
|
| |
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
The libraries listed in Requires aren't needed during build time, they
are library depedencies. And since this is only needed if linking
statically, we can safely move them to Requires.private.
Succesfully tested change with compilation against virt-viewer.
Later, this will also help fixing bug rhbz #799112.
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|