Commit Graph

3962 Commits

Author SHA1 Message Date
Frediano Ziglio
faa0271acb red-replay-qxl: Remove useless end of line
Spice log functions already add an end of line.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-11-16 10:17:32 +00:00
Frediano Ziglio
34a44d3e94 test-display-base: Avoid spurious errors due to listen failures
To set up a listening socket usually you call in sequence:
- socket;
- bind;
- listen.
If you try to bind() to a port when another socket is already
listening on that port, the bind() will fail.
However, it is possible that the bind() may succeed and the listen()
will fail, as demonstrated in the following sequence:
- socket() create socket 1;
- bind() to port N on socket 1;
- socket() create socket 2;
- bind() to port N on socket 2;
- listen() on socket 1;
- listen() on socket 2 <-- failure.

When running tests (especially multiple tests running in parallel), it
may sometimes happen that there are other tests already listening on
the port that we are trying to use. In this case, we want to ignore
this error and simply try to listen on a different port. We already
attempted to handle this scenario, but we were only ignoring bind()
errors and not listen() errors. So in the scenario mentioned above,
the listen() error was causing the entire test to fail instead of
allowing us to try to listen on another port.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2018-11-10 08:19:01 +00:00
Frediano Ziglio
a618d5df57 ci: Do not try to downgrade asciidoc anymore
Is not more necessary to downgrade asciidoc, the issue was fixed
in Fedora 29, now used by CI.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2018-11-08 16:46:31 +00:00
Frediano Ziglio
1c523c90e4 char-device: Remove initial underscores from __red_char_device_write_buffer_get
Just cosmetic changes, the static function had underscores to
distinguish from the exported one which was recently renamed.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Lukáš Hrázký <lhrazky@redhat.com>
2018-11-08 10:22:17 +00:00
Lukáš Hrázký
72ceb62d0e reds: move vdagent write buffer creation into a function
Adds a function to create a write buffer for sending a message to
vdagent from the server to prevent code duplication.

Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-11-08 08:08:34 +00:00
Lukáš Hrázký
e810b48fcd char-device: separate functions to get write buffer for client and server
Instead of having a single red_char_device_write_buffer_get function to
get both client and server buffers and decide by testing client == NULL,
have separate function for a client and for a server. The situation
should always be clear (you're either on the client or on the server
side) and you shouldn't need to parametrize that.

For the server case, add a use_token parameter instead of a separate
red_char_device_write_buffer_get_server_no_token function, as you may
want to parametrize that.

Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-11-08 08:08:28 +00:00
Frediano Ziglio
585b534c0c reds: Use monotonic time for ticket expiration
Avoid time adjustment issues.
For instance ticket validity can change when daylight time changes.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Lukáš Hrázký <lhrazky@redhat.com>
2018-10-30 10:17:19 +00:00
Frediano Ziglio
c4e26a54d0 Use new common demarshallers.h
Avoids mismatching duplicate declarations causing potentially
ABI incompatibilities.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-10-15 13:39:10 +01:00
Frediano Ziglio
3deedc3b6b utils: Get monotonic time in a coherent way
Use a single function to get monotonic time.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-10-09 15:34:10 +01:00
Frediano Ziglio
b27e0e6f0b display-channel: Remove useless parenthesis
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-10-09 12:54:14 +01:00
Frediano Ziglio
9a0d8b2db8 red-stream: Propagate RedStreamSslStatus type
Do not convert RedStreamSslStatus enumeration type back to int.
This allows compilers to perform some more type safe checks.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-10-09 12:52:48 +01:00
Christophe Fergeau
f84b26f801 utils: Remove spice_get_monotonic_time_ms
This is a thin wrapper over g_get_monotonic_time_ms, and is called only
once, so we can call directly g_get_monotonic_time_ms instead.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-10-08 17:15:55 +02:00
Frediano Ziglio
8b5543dc6a ci: Use release build with Meson
Some compiler warnings are triggered only if optimisations are
turned on. By default with debug build optimisations are disabled.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2018-09-28 13:44:33 +01:00
Eduardo Lima (Etrunko)
7b97489bda Bump meson requirement to 0.47.2
This new version ships the fix for the issue where 'check' keyword could
not be used in project definition, so we had to run that command again
only to check if it succeeded.

https://github.com/mesonbuild/meson/issues/3944

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-09-26 11:21:59 +01:00
Lukáš Hrázký
d191450ee5 red-qxl: remove an unnecessary level of indirection in create/destroy surface
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-09-25 17:12:40 +02:00
Lukáš Hrázký
145362b046 Count display channels for tablet mode check
Having a single QXL interface is not enough, there can be other (e.g.
streaming) display channels that make the tablet unusable. Add a check for the
number of display channels also being equal to 1. We still need the check for
QXL interaces, because the tablet only works with QXL.

Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-09-21 10:03:10 +01:00
Frediano Ziglio
4f08f50de9 syntax-check: Add missing contributors names to AUTHORS
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2018-09-19 20:31:31 +01:00
Changqing Li
fea0c0c16f spice: fix compile error
fix below compile error:
format '%d' expects argument of type 'int', but argument 6 has
type 'long unsigned int' [-Werror=format=]

spice compile failed on 32bit system, since upstream commit
9541cd2fe change %ld to %PRIdPTR, %PRIdPTR is %d, but argument
strm.total_out is uLong.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-09-19 16:11:10 +01:00
Eduardo Lima (Etrunko)
99b08f0dd2 meson: Fix usage of add_project_arguments()
This function does accept a list of arguments, so there is no need to
iterate over it.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-09-03 08:49:56 +01:00
Eduardo Lima (Etrunko)
b60acbab53 ci: Workaround asciidoc failure
Since commit e5a93d7a30 asciidoc has been
failing. Frediano noticed that there is no such problem with Fedora 27,
and it looks like asciidoc version 8.6.10 in Fedora 28 is causing
the problem. Downgrading it to 8.6.8 seems to fix it while we don't
find the definite solution.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-08-31 07:30:25 +01:00
Eduardo Lima (Etrunko)
e5a93d7a30 Update gitlab-ci to use meson
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-08-30 11:10:56 -03:00
Eduardo Lima (Etrunko)
495d1612c4 Add support for building with meson/ninja
In a comparison with current autotools build system, meson/ninja
provides a huge improvement in build speed, while keeping the same
functionalities currently available and being considered more user
friendly.

The new system coexists within the same repository with the current one,
so we can do more extensive testing of its functionality before deciding
if the old system can be removed, or for some reason, has to stay for
good.

- Meson: https://mesonbuild.com

  This is the equivalent of autogen/configure step in autotools. It
  generates the files that will be used by ninja to actually build the
  source code.

  The project has received lots of traction recently, with many GNOME
  projects willing to move to this new build system. The following wiki
  page has more details of the status of the many projects being ported:

    https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting

  Meson has a python-like syntax, easy to read, and the documentation
  on the project is very complete, with a dedicated page on how to port
  from autotools, explaining how most common use cases can be
  implemented using meson.

    http://mesonbuild.com/Porting-from-autotools.html

  Other important sources of information:

    http://mesonbuild.com/howtox.html
    http://mesonbuild.com/Syntax.html
    http://mesonbuild.com/Reference-manual.html

- Ninja: https://ninja-build.org

  Ninja is the equivalent of make in an autotools setup, which actually
  builds the source code. It has being used by large and complex
  projects such as Google Chrome, Android and LLVM. There is not much to
  say about ninja (other than it is much faster than make) because we
  won't interact directly with it as much, as meson does the middle man
  job here. The reasoning for creating ninja in the first place is
  explained on the following post:

    http://neugierig.org/software/chromium/notes/2011/02/ninja.html

  Also its manual provides more in-depth information about the design
  principles:

    https://ninja-build.org/manual.html

- Basic workflow:

  Meson package is available for most if not all distros, so, taking
  Fedora as an example, we only need to run:

    # dnf -y install meson ninja-build.

  With Meson, building in-tree is not possible at all, so we need to
  pass a directory as argument to meson where we want the build to be
  done. This has the advantage of creating builds with different options
  under the same parent directory, e.g.:

    $ meson ./build --prefix=/usr
    $ meson ./build-extra -Dextra-checks=true -Dalignment-checks=true

  After configuration is done, we call ninja to actually do the build.

    $ ninja -C ./build
    $ ninja -C ./build install

  Ninja defaults to parallel builds, and this can be changed with the -j
  flag.

    $ ninja -j 10 -C ./build

- Hacking:

  * meson.build: Mandatory for the project root and usually found under
                 each directory you want something to be built.

  * meson_options.txt: Options that can interfere with the result of the
                       build.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-08-30 11:10:45 -03:00
Snir Sheriber
4ed9e3b92c Support h265 in stream-channel
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-08-22 16:58:14 +02:00
Christophe Fergeau
eaa07ef15c build: Prepare for 0.14.1 release
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2018-08-22 16:48:17 +02:00
Christophe Fergeau
f60021f864 Revert "Support h265 in stream-channel"
This commit needs an unreleased version of spice-protocol.
The revert is temporary in order to get the spice-server 0.14.1 release
out.

This reverts commit 9f5859c3ba.
2018-08-22 13:30:51 +02:00
Christophe Fergeau
65c018fbbb docs: Add documentation for the streaming device
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2018-08-17 14:23:48 +02:00
Frediano Ziglio
94c1a35fee Update spice-common submodule
This brings in the following changes:

Eduardo Lima (Etrunko) (5):
      ci: Fix typo: celt501 -> celt051
      meson: Make options accessible through parent project
      meson: Fix checking for python
      Meson: Make use of dictionary type introduced in version 0.47
      Meson: Make use of 'feature' option type introduced in version 0.47

Frediano Ziglio (2):
      ci: Fix Meson feature option
      Fix flexible array buffer overflow

Lukáš Hrázký (1):
      spice*.proto: Replace tabs with the appropriate number of spaces

Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2018-08-16 21:29:52 +01:00
Uri Lublin
0669178da3 Remove unused structs QXLDrawArea and QXLDevInfo
The structure usage was removed from commit
  2ba69f9f88
  ("libspice: add surface 0 support").

They were never used by Qemu.

Signed-off-by: Uri Lublin <uril@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-08-09 18:02:40 +01:00
Lukáš Hrázký
5c98338479 test-stream-device: Expect the g_log warning about invalid message
Fixes test-stream-device after adding a log warning about an invalid
message received on the stream device, glib tests fail on unexpected
warning messages.

Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-08-09 11:28:29 +01:00
Christophe Fergeau
81480cc3cc build: Fix build from tarballs
Following commit fcaf8d1a1, build from tarballs/make distcheck is broken
as spice-server-enums.h is not regenerated when building from tarballs,
and we don't have a -I$(top_srcdir) in our build flags, just
-I$(srcdir). This commit changes #include <server/spice-server-enums.h>
to #include <spice-server-enums.h> which avoids the problem fixed by
commit fcaf8d1a1 without breaking make distcheck.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-08-09 11:27:47 +01:00
Lukáš Hrázký
dde6fed81f Log the invalid message from the stream device
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-08-08 18:41:15 +02:00
Christophe Fergeau
fcaf8d1a1c build: Use <> rather than "" for including spice-server-enums.h
When using #include "spice-server-enums.h", it will be looked up first
in the directory containing the file being build, which is going to be
$srcdir when dcc.c includes it. However, spice-server-enums.h is a
generated file, so it will be in $builddir, not in $srcdir. This most of
the time won't be causing any problems, except when you happen to have
an invalid spice-server-enums.h in $srcdir and you are doing an
out-of-tree build.
Using #include <spice-server-enums.h> instead allows the correct
spice-server-enums.h file to be looked up.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Lukáš Hrázký <lhrazky@redhat.com>
2018-08-08 17:03:06 +02:00
Victor Toso
606f747bcc README: Report bugs to gitlab issue tracker
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Snir Sheriber <ssheribe@redhat.com>
2018-08-06 15:14:57 +02:00
Eduardo Lima (Etrunko)
b0e141b387 build: Move spice-common to subprojects/ directory
The reason for this commit is that Meson expects all submodules to be
placed in this subdirectory, and since autotools build is more flexible
in this case, we make some small adjustments to configure.ac and
Makefile.am files to accommodate for this change.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-07-23 14:49:19 -03:00
Christophe Fergeau
35488f1562 dcc: Rework COMPRESS_DEBUG macro
Rather than using
 #ifdef COMPRESS_DEBUG
   spice_info(...);
 #endif

we can #define COMPRESS_DEBUG to spice_debug() or to do nothing for a
slight readability improvement. This opportunity is used to replace
these spice_debug() calls with g_debug(). The "do nothing" macro is a bit
convoluted to ensure that we will have a compile-time check for our
g_debug args.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-07-23 12:01:09 +02:00
Christophe Fergeau
48179332d9 dcc: Fix QUIC fallback in get_compression_for_bitmap()
There was a small regression introduced in get_compression_for_bitmap()
by f401eb07f dcc: Rewrite dcc_image_compress.
If SPICE_IMAGE_COMPRESSION_AUTO_GLZ is specified, and the bitmap has a
stride which is bigger than its width (ie it has padding), then
get_compression_for_bitmap() will return SPICE_IMAGE_COMPRESSION_OFF
while in that case, we used to use QUIC for compression.

This happens because that function in the AUTO_GLZ case first checks if
QUIC should be used, if not, it decides to use GLZ, but then decides it
can't because of the stride, so falls back to OFF, while it used to
fall back to QUIC.

This commit only slightly reworks a preexisting if (!can_lz_compress())
check so that it's unconditional rather than depending on the previous
checks having been unsuccessful.

This issue could be observed by using a spice-html5 without support for
uncompressed bitmaps with end-of-line padding by simply starting a f28
VM and connecting to it/moving the mouse cursor in it.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-07-20 12:36:19 +01:00
Christophe Fergeau
25e404b4f1 dcc: Improve can_lz_compress() comment
Both glz_encode and lz_encode error out if the bitmap stride does not
match the bitmap width.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-07-20 09:15:36 +01:00
Christophe Fergeau
8559a69fa6 worker: Fix 'seemless' typo in comment
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-07-20 09:15:33 +01:00
Frediano Ziglio
4d162260fc test-stream-device: Check data are sent together
Check that data sent to device are collapsed in a single message.
The StreamChannel object is mocked in the test.
This checks that commit dcc3f995d9
("stream-device: handle_data: send whole message") is doing the
right thing.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-19 14:12:31 +01:00
Frediano Ziglio
91aa8ac830 test-stream-device: Factor out a function to start the test
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-19 14:12:28 +01:00
Frediano Ziglio
2f3634441f test-stream-device: Put common parts in setup/teardown functions
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-19 14:12:26 +01:00
Frediano Ziglio
e3bb59c76b test-stream-device: Check server detect and signal huge data
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-19 14:12:22 +01:00
Frediano Ziglio
c66a312137 red-stream-device: Fix and check empty data messages
If guest sent an empty data message this was not parsed correctly.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-19 14:12:17 +01:00
Lukáš Hrázký
e25e7dc00b Rename SpiceHead::id to monitor_id in the protocol
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-07-18 08:17:13 +01:00
Frediano Ziglio
b007f6144a Update spice-common submodule
This brings in the following changes:

Christophe Fergeau (20):
      build: Update git.mk to latest version
      build: Remove docs/.gitignore
      build: Add __pycache__/*.pyc to DISTCLEANFILES
      log: Only install glib log handler if SPICE_DEBUG_LEVEL is set
      test-logging: Improve debug level tests
      test-region: Use GTest API
      test-region: Replace direct printf with g_debug() calls
      test-region: Don't call region_dump() by default
      test-region: Remove unneeded printf
      test-region: Replace spice_assert() with g_assert_true()
      test-region: Add g_assert() checks
      snd: Replace spice_printerr() use with g_warning
      swcanvas: Remove canvas_create()
      meson: Remove '(default: xxx)' from option description
      log: Remove SPICE_DISABLE_ABORT
      common: Remove spice_abort()
      build: Remove spice_common.h
      pixman: Use g_error() rather than g_abort()
      build: Define GLIB_VERSION_MIN_REQUIRED/GLIB_VERSION_MAX_ALLOWED
      quic: Wrap declaration/call of quic method in macros

Christophe de Dinechin (1):
      Add SPICE_ATTR_NORETURN on prototype of error functions

Eduardo Lima (Etrunko) (5):
      Add .gitlab-ci.yml file
      meson: Enable '-std=c99' build flag
      meson: Cleanup optional dependency checks
      Update gitlab-ci to use meson
      test-region: Decrease loop count by a factor of 10

Frediano Ziglio (36):
      test-quic: Allows to specify multiple images to test
      canvas_base: Rework DUMP_JPEG debugging
      test-quic: Increase test timeout using Meson
      ssl_verify: Fix build for newer LibreSSL
      Revert "ssl_verify: Fix build for newer LibreSSL"
      ssl_verify: Fix build for newer LibreSSL
      test-region: Create proper test for region from source code
      marshaller: Fix a possible leak
      canvas_base: Make sure top_down is a boolean
      marshal: Fix a bug with zero attribute
      ptypes: Improve some attribute documentation
      build: Reuse TEST_MARSHALLERS macro
      build: Reindent macros
      log: Remove spice_printerr macro
      test-marshallers: Check for "zero" attribute
      quic: Call encode from golomb_coding
      canvas_base: Fix minor indentation issues
      canvas_base: Avoid misaligned access decoding LZ4 data
      meson: Remove -std=c99
      quic: Add UPDATE_MODEL_COMP macro to iterate over channels
      quic: Rework PIXEL_A/PIXEL_B macros
      quic: Add SAME_PIXEL macro
      quic: Make {UN, }COMPRESS_xx macros closer
      quic: Add missing #undef SET_a/GET_a
      quic: Call directly encode_state_run from templates.
      quic: Add CORRELATE*/DECORRELATE* macros
      quic: Add APPLY_ALL_COMP macro to iterate over channels
      quic: Move all golomb decoding macros in a single place
      quic: Add DECLARE_*_VARIABLES macros
      quic: Introduce COPY_PIXEL macro
      quic: Reorder macro declarations
      quic: Unify rgb/non-rgb macro declarations
      quic: Remove duplicate file
      canvas_base: Check for overflows decoding LZ4
      canvas_base: Change spice_warning to g_warning
      tests: Join test-overflow and test-marshallers

Snir Sheriber (1):
      protocol: Add support for h265 video codec

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Lukáš Hrázký <lhrazky@redhat.com>
2018-07-18 08:11:18 +01:00
Frediano Ziglio
6f5681d4f8 red-stream-device: Fix leaks in dispose and finalize chaining parent
dispose and finalize methods have to call parent relative
cleanup method to avoid leaking resources.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-13 09:54:31 +01:00
Frediano Ziglio
bc14aaecd7 reds: Free device chain in spice_server_destroy to avoid leaks
Leak detectors did not manage to find leaks, possibly as double list
have all elements likely with a pointer to them.
The reference from the agent is necessary for inserting it into
the list.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-12 15:15:10 +01:00
Frediano Ziglio
c778c7ce93 glz-encoder-dict: Remove a warning compiling with CentOS 7
CentOS 7 compiler generate this warning:

glz-encoder-dict.c: In function 'glz_dictionary_pre_encode':
glz-encoder-dict.c:516:30: error: 'prev_seg_id' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             dict->window.segs[prev_seg_id].next = seg_id;
                              ^
glz-encoder-dict.c:492:22: note: 'prev_seg_id' was declared here
     uint32_t seg_id, prev_seg_id;
                      ^

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-11 10:22:36 +01:00
Frediano Ziglio
65eca77c81 ci: Run an additional make check using Centos
Make sure we can compile and run base tests using latest Centos.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-11 10:21:26 +01:00
Christophe Fergeau
014e4d7263 tests: Add G_PID_FORMAT to glib compat header
G_PID_FORMAT was only added in glib 2.50.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2018-07-08 16:24:35 +01:00