Commit Graph

352 Commits

Author SHA1 Message Date
Søren Sandmann Pedersen
c0b048ebef Add support for A8 images to the LZ routines
This format is needed to add Render support to the X driver, so we
need the ability to compress and decompress it.
2012-08-24 13:37:51 -04:00
Søren Sandmann Pedersen
0c1b6de4ad canvas_utils: Make sure strides are aligned to multiple of 4
Pixman requires all strides to be aligned to a multiple of 4. With the
upcoming a8 images, this is not guaranteed anymore.
2012-08-13 11:54:04 -04:00
Marc-André Lureau
c2adbb00dc spice-common: don't install spice-protocol
Revert to usage of DIST_SUBDIRS to avoid make install under
spice-protocol. This is only possible since git.mk was fixed.
2012-08-09 12:44:41 +02:00
Marc-André Lureau
9768ebf80d Update git.mk to upstream version
wget https://raw.github.com/behdad/git.mk/master/git.mk
2012-08-09 12:44:41 +02:00
Marc-André Lureau
735e431671 build-sys: fix make distcheck
- don't try to overwrite read-only enums.h
- DIST_SUBDIRS is no longer needed
2012-07-16 17:35:08 +02:00
Alon Levy
7eba850ad5 support multiple monitors in single display channel
See spice-protocol commit for details:
 da908f89b581fd4725da997fdaea209f8e6548f6
 support multiple monitors on a single display channel
2012-07-12 19:50:40 +03:00
Alon Levy
b49c4794ee spice-protocol/spice/enums.h: rebuild from spice.proto
This file was hand generated until now, resulting in the wierd situation where
it is different for spice-gtk and spice-server even though they both use the
same spice-common and spice-protocol (or at least close) versions.

This patch generates the enums.h files from spice-common. While that file is
actually in the spice-protocol submodule, it cannot be generated from
spice-protocol since it lacks access to spice.proto and spice_codegen.py. So in
affect whenvever it will differ the spice-protocol module will become dirty and
hence hopefully commited with the new enums.h.

enums.h is generated from spice.proto is a superset of that generated from spice1.proto.
2012-07-08 18:12:18 +03:00
Alon Levy
2449260c81 common/log.h: add spice_info 2012-07-05 19:22:31 +03:00
Marc-André Lureau
f8f6231ecd Fix a gcc warning
warning: suggest explicit braces to avoid ambiguous 'else'
2012-06-30 02:54:53 +02:00
Marc-André Lureau
5020adc59f Fix invalid macro usage 2012-06-30 02:50:56 +02:00
Christophe Fergeau
bf5511033d ssl: more verbose output when SSL verification fails
This should make SSL connection failures easier to diagnose.
2012-06-25 14:59:59 +02:00
Alon Levy
800784df43 update spice-protocol for smartcard enums fix
d5d26cac49 broke spice-common by depending
on a local commit, fix it by depending on the now pushed commit.
2012-06-22 17:23:03 +03:00
Alon Levy
d40a181a20 Makefile.am: now that spice_codegen.py is used add *.pyc to ignored files in root 2012-06-20 16:25:33 +03:00
Alon Levy
9dff18a399 Makefile.am: fix .gitignore not being generated in spice-protocol/spice
By adding spice-protocol to SUBDIRS configure and make will be called in it.

Spotted by Marc-André.
2012-06-20 16:25:33 +03:00
Alon Levy
d5d26cac49 updated spice-protocol for smartcard enums non conflict with libcacard 2012-06-20 16:25:33 +03:00
Alon Levy
535b52db66 smartcard: build fixes for spice server
Define different enums that have a SPICE_ prefix to not conflict with same
value enums from libcacard/vsccard_common.h, and continue to use the same
SPICE_MSG_SMARTCARD_DATA and SPICE_MSGC_SMARTCARD_DATA enum that is used by the
server and clients (spice-gtk, spicec) alike.
2012-06-14 13:53:46 +03:00
Alon Levy
a976c16cf3 python_modules/ptypes.py/EnumBaseType.c_enumname: add missing return to fix broken enums generation
Fixes the resulting enums.h from the invocation of:
./spice_codegen.py --generate-enums spice.proto spice-protocol/spice/enums.h

Right now any enum will contain None as the enum members, with this fix
it will contain the real enum members, i.e. SPICE_FOO.
2012-06-14 13:53:46 +03:00
Marc-André Lureau
5f44094940 ssl-verify: add a bit of run-time checks
Even if they are not public functions, those conditions can be reached
in a invalid state.
2012-05-17 14:38:28 +02:00
Yonit Halperin
22fc0b0145 video streaming: add support for frames of different sizes
rhbz #813826, #815426

Add SPICE_MSG_DISPLAY_STREAM_DATA_SIZED, for stream_data message
that also contains the size and destination box of the data.
The server can send such messages only to clients with
SPICE_DISPLAY_CAP_SIZED_STREAM.
2012-05-02 14:47:29 +03:00
Yonit Halperin
178c7eaff6 region: add region_extents 2012-05-02 14:47:27 +03:00
Yonit Halperin
cbf423f833 rect: add rect_debug 2012-05-02 14:47:26 +03:00
Yonit Halperin
ffeb6ce677 rect: add rect_get_area 2012-05-02 14:47:26 +03:00
Yonit Halperin
2e4b605272 rect: add rect_contains 2012-05-02 14:47:26 +03:00
Jeremy White
f37ba0d032 Set the clip type to reflect the on wire type. 2012-04-26 19:47:10 +03:00
Daniel P. Berrange
ff25524948 Add missing struct field initializers
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25 14:23:31 +01:00
Aric Stewart
6af29a97ac move variable decleration to head of code block
Signed-off-by: Aric Stewart <aric@codeweavers.com>
2012-04-18 17:53:05 +03:00
Aric Stewart
6bb8d93bbf allow log.c to compile under MSVC++ 2012-04-18 16:54:33 +03:00
Aric Stewart
d77d056022 add padding member to SpiceMsgEmpty
Empty structures are undefined in C, gcc handles them without issue
assigning a size of 0. However MSVC++ generates a hard error (C2015)
this allows messages.h to be included in c files compiled by MSVC++.

Signed-off-by: Aric Stewart <aric@codeweavers.com>
2012-04-18 16:02:07 +03:00
Aric Stewart
7814bdf71d Add a return value to the default case in create_bitmap to satisfy VC++ 2012-04-17 10:17:10 +03:00
Christophe Fergeau
39fef7a5da demarshall: add missing parens in BE read_xxx functions
The missing parens causes build to fail on big-endian machines
2012-04-06 15:32:02 +02:00
Christophe Fergeau
e96dbb4172 Update spice-protocol submodule
We need the USB redirection controller messages
2012-04-04 10:20:00 +02:00
Hans de Goede
c678122d6a configure.ac: lower required autoconf version to 2.63
So that one can autogen.sh on RHEL-6.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-04-03 15:03:05 +02:00
Yonit Halperin
2ab866f522 update submodule spice-protocol
added the disable-effects and color-depth options to the controller

Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
2012-04-03 08:23:02 +03:00
Marc-André Lureau
e3f6941895 Bypass certicate verification failure if PUBKEY check only
During switch-host migration, only PUBKEY verification is required.
Couldn't it just load the certificate again for the new session?
perhaps, but that's they way the code used to work until I introduced
a regression in spice commit d46f9d3f4e006d3bca9b99fac25169b17e7ac803.
2012-03-30 14:10:00 +02:00
Marc-André Lureau
a0339261d4 ssl-verify: improve logging report in case of errors
Use the log.h system, and report a bit more information in the debug level
2012-03-30 14:10:00 +02:00
Marc-André Lureau
1b41d15a99 Fix harmless warnings in quic_encode()
The quic code has been changed recently this way:

-    ASSERT(encoder->usr, line);
+    if (line == NULL) {
+        spice_warn_if_reached();
+        return QUIC_ERROR;
+    }

It appears that the only caller of quic_encode() gives a NULL line and
rely on the more_lines() callback to return new lines instead.

Adjust the code accordingly, adding a few more checks to verify the
caller gives/returns correct values.
2012-03-28 13:30:18 +02:00
Marc-André Lureau
fb24e4e28b build-sys: split client marshallers in seperate lib 2012-03-25 18:38:09 +02:00
Marc-André Lureau
c1e4e1be63 build-sys: make it a seperately buildable spice-common library
- autotoolize
- fix headers inclusion
- generate gitignores
- workaround serverSMARTCARD support with dirty hack...
2012-03-22 20:21:05 +01:00
Marc-André Lureau
feaee86076 spice.proto: fix demarshaller crash with name message
It turned out the demarshaller wasn't allocating enough space to
memcpy the name. In order to take into account the size of a variable
array, it needs to be marked with the @end tag so that the
"extra_size" is added to the allocated memory.

It would be nice if the demarshaller would somehow fail if this wasn't
set explicitly, or do the right thing by default.

@end the name so that demarshaller
2012-03-21 13:24:17 +01:00
Marc-André Lureau
bc4f5db323 codegen: ifdef/endif function declaration too
Compile out part that we are not supporting.  In the future, we might
want to declare a fake type and an empty function to keep API
compatibility
2012-03-21 13:24:17 +01:00
Marc-André Lureau
b6afcd632e codegen: include headers locally 2012-03-21 13:24:17 +01:00
Marc-André Lureau
2d4e0d2000 codegen: struct marshallers are not current function helper
This solves the issue of struct_marshallers being included within the
current ifdef/endif body, although they are independant functions.
2012-03-21 13:24:16 +01:00
Christophe Fergeau
3df7798413 use new @ifdef directive for smartcard messages
We don't want to conditionally compile the smartcard messages
depending on whether USE_SMARTCARD is set or not, we can now use
the @ifdef attribute for that.
2012-03-20 15:31:30 +01:00
Christophe Fergeau
7f86151f18 add smartcard bits to spice.proto 2012-03-20 15:31:30 +01:00
Hans de Goede
69aecfc1bc spice_codegen: Always write a channels entry for an ifdef-ed channel
Before this patch, if a channel is defined conditionally in spice.proto
(because it depends on external headers like the smartcard channel),
spice_codegen would write an entry to the channels array in
spice_get_*_channel_parser which would only take up a place in the array
if the ifdef condition is true, thus moving up all other intializers
one place when it is not true. This was causing issues (crashes) when building
spice-gtk with the combination of usbredir support enabled and smartcard
support disabled.

This patch fixes this by adding #else { NULL, 0 }, to the generated code.

Thanks to coolper chen <lixin.chen@saicocch.com> for reporting this!

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-20 15:31:30 +01:00
Christophe Fergeau
a7cc3c6a56 handle @ifdef on messages and channels 2012-03-20 15:31:30 +01:00
Christophe Fergeau
7307fccb71 allow attributes on channel elements in .proto files
We want to be able to add an @ifdef annotation to optional messages
For example, we want to compile in the smartcard messages only if
libcacard is available
2012-03-20 15:31:30 +01:00
Christophe Fergeau
eb01d2fc46 add ifdef/endif methods to spice code generator
These methods will be needed to be able to make some fields optional
in spice.proto
2012-03-20 15:31:30 +01:00
Christophe Fergeau
51cf6fce72 fix copy & paste error in ptypes.py 2012-03-20 15:31:30 +01:00
Marc-André Lureau
f7af6264ea Add SPICE_ATTR_NORETURN and use it for a few functions 2012-03-20 15:30:24 +01:00