Neither Spice nor spice-gtk are using this since the
following commit in Spice "server: remove OpenGL"
c5c176a5c7718177f23b07981556b5d460627498
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
Building spice or spice-gtk from git requires python modules pyparsing
and six. Search for them in the both Python versions and set
the Python version accordingly.
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Newer lz4 headers give deprecated warning using LZ4_compress_continue
instead of LZ_compress_fast_continue so detect this function
to allow usage and avoid the warning.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
LZ4 changed versioning scheme from r131 to v1.7.3 making our configure
fail with (1.7.3 < 129).
Switch from version checking to checking that the necessary function
is available.
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Moving out a big switch statement that sole purpose is to retrieve the
surface (pixma_image_t)
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
The verify macro used currently has some problem
as it raise a warning in RHEL6.
As suggested in verify.h use verify_expr macro
to avoid the warning.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
The generated spice_protocol.html file and the Makefile were not
included in gitignore. This patch fixes it.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
The protocol file is not documented and people have to read code to
understand the specification.
This can lead to unexpected or not optimal results so it's better
to have it documented.
The m4/spice_manual.m4 came from spice server and is meant to be
reused.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
LZ4 data compression on spicevmc channel uses LZ4_compress_default()
API introduced in 129 release (see commit bellow)
[0] https://github.com/Cyan4973/lz4/commit/1b17bf2ab8cf66dd2b740e
Acked-by: Pavel Grunt <pgrunt@redhat.com>
Reported-by: Fabio Fantoni <fantonifabio@tiscali.it>
Python 2.6 does not have a flags parameter.
This is needed for RHEL 6.8.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
As client_marshallers.h is included outisde of spice-common, we need to
specify the path for generated_marsharllers.h so that builds out of the
tree don't fail.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This commit adds autogeneration of a generated_client_marshallers.h
header, which is then included in client_marshallers.h
This allows to remove the SpiceMessageMarshallers struct from this file,
which has to match what the generated code expects.
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Until now, the same header guard was used for all generated .h files.
Now the header guard name is based on the name of the file being
generated so that it's different for each .h file.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Includes specified on the command line are currently #included with <>
rather than "". However, they are usually spice-common headers, so it
makes more sense to include them using ""
Acked-by: Pavel Grunt <pgrunt@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Not supported by code so trigger an error to avoid invalid usages
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Add a new 'HAVE_LZ4' automake conditional to really tell if we have the
dependency installed on the system. It will later be used in Makefile to
decide whether or not the specific files related to LZ4 should be built.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Compressed message type is CompressedData which contains compression
type (1 byte) followed by the uncompressed data size (4 bytes-exists
only if data was compressed) followed by the compressed data
Update the required protocol to 0.12.12:
Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
On Windows long is always 32 bit so under x64 the cast from pointer to
"unsigned long" cause a warning.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
No need to keep API compatibility in spice-common.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Marc-André Lureau <mlureau@redhat.com>
Without this, the demarshalling code does not know we expect exactly
SpiceMsgSmartcardData::length bytes, and has to guess it from the
amount of data which was sent
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
The loop (for (;;)) will be executed only once, so, no reason for
keeping it.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
len is overwritten in the match label with the value from
"ip - anchor".
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
All decompress functions used after this check take into account that
encoder->palette is not NULL. So, if we already detected that the
palette is NULL, let's just return early.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
It is used in canvas_get_lz4() which is guarded by USE_LZ4, and
in canvas_get_lz() which is guarded by SW_CANVAS_CACHE.
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
SPICE_COMMON_{CFLAGS,LIBS} references '$(GL_{CFLAGS,LIBS)', so these
variables are going to be expanded at 'make' time rather than at
'configure' time.
The linker flag and the compiler flag won't be substituted in the
generated Makefile without AC_SUBST.
It causes spice-gtk building failure with --enable-opengl option.
The patch fixes this issue.
Signed-off-by: Lin Ma <lma@suse.com>
LZ image decompression was broken for 16 bpp:
- stride was computed not computed correctly (as width*4). This caused
also a buffer underflow;
- stride in pixman is always multiple of 4 bytes (so for 16 bpp is
ALIGN(width*2, 4)) so image decompressed by lz_decode as some missing
bytes to be fixed.
The alignment code is reused from LZ4 function.
This fix also https://bugzilla.redhat.com/show_bug.cgi?id=1285469.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
While testing spice-server on EL6, I was getting random crashes in the
glib logging code because g_logv was called recursively even though this
was not visible in a backtrace.
It turns out on older glib versions (EL6 has 2.28), g_logv is not
thread-safe unless g_thread_init() is called first. If g_thread_init()
is not called, the GMutex/GPrivate calls g_logv makes are turned into
no-ops, which is going to cause the recursion issue I was seeing.
This commit adds a call to g_thread_init() for these older glib
versions.
(gdb) bt
0x7fff9f9fb110 "item.type: 114", unused_data=0x0) at gmessages.c:863
format=0x7ffff50e72ac "item.type: %d", args1=0x7fff9f9fb640) at gmessages.c:517
SPICE_LOG_LEVEL_DEBUG, strloc=0x7ffff50e72ba "dcc.c:1652", function=
0x7ffff50e7320 "release_item_before_push", format=0x7ffff50e72ac "item.type: %d", args=
0x7fff9f9fb640) at log.c:163
SPICE_LOG_LEVEL_DEBUG, strloc=0x7ffff50e72ba "dcc.c:1652", function=
0x7ffff50e7320 "release_item_before_push", format=0x7ffff50e72ac "item.type: %d") at log.c:195
at dcc.c:1652
at dcc.c:1719
at dcc-send.c:2450
at red-channel.c:578
at red-channel.c:1587
at event-loop.c:122
0x7ffff4fb2ef2 <watch_func>, user_data=0x7fff980244e0) at giounix.c:166
0x7ffff86ec770) at gmain.c:3092