summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix min gcc version for __attribute__(format)Christophe Fergeau2013-08-201-7/+3
| | | | | | | | | | | We currently use it only on gcc 4.5 or newer, but it was actually introduced much earlier than that. It's documented in gcc 2.95.3 manual: http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC84 and glib uses starting from gcc 2.2.5. This commit uses the same minimum version as glib. This was causing warnings on RHEL6 systems which have gcc 4.4.7
* add SPICE_MSG_PLAYBACK_LATENCYYonit Halperin2013-04-221-0/+4
| | | | | | | SPICE_MSG_PLAYBACK_LATENCY is intended for adjusting the latency of the audio playback. It is used for synchronizing the audio and video playback. The corresponding capability is SPICE_PLAYBACK_CAP_LATENCY.
* add stream report messagesYonit Halperin2013-04-222-0/+19
| | | | | | | | | If the server & client support SPICE_DISPLAY_CAP_STREAM_REPORT, the server first sends SPICE_MSG_DISPLAY_STREAM_ACTIVATE_REPORT. Then, the client periodically sends SPICE_MSGC_DISPLAY_STREAM_REPORT messages that supply the server details about the current quality of the video streaming on the client side. The server analyses the report and adjust the stream parameters accordingly.
* Add compile-time check for lz arraysChristophe Fergeau2013-04-103-0/+251
| | | | | | | | | | | In addition to Laszlo's commit fixing rhbz#928973, we can add some compile-time assertion to lz_common.h to help catch similar bugs in the future. This uses gnulib's verify.h to make sure at compile-time that the various constant arrays used in lz_common.h are of the expected size. I've checked that before Laszlo's patch, the assert triggers, and that it's gone after it.
* supply missing IS_IMAGE_TYPE_* elements for LZ_IMAGE_TYPE_A8Laszlo Ersek2013-04-101-2/+2
| | | | | | | | | | | | | | The IS_IMAGE_TYPE_PLT and IS_IMAGE_TYPE_RGB arrays are supposed to decide whether each image type is PLT or RGB. Dependent on the result, one of the PLT_PIXELS_PER_BYTE and RGB_BYTES_PER_PIXEL arrays can be indexed. Commit c0b048eb introduced the LZ_IMAGE_TYPE_A8 enum constant and grew the RGB_BYTES_PER_PIXEL array by one element, but it missed to append a zero to IS_IMAGE_TYPE_PLT, and a one to IS_IMAGE_TYPE_RGB. Do so now. Related RHBZ: 928973. Signed-off-by: Laszlo Ersek <lersek@redhat.com>
* region.c: fix region_bounds_intersectsYonit Halperin2013-04-021-1/+1
| | | | | region_bounds_intersects mistakingly ignored one of the input regions, and compared the other region to itself.
* Address a compilation warning due to missing typecastMichael Tokarev2013-02-071-1/+1
| | | | | | | | | Author: Serge Hallyn <serge.hallyn@ubuntu.com> This is a trivial typecast fix, -- all surrounding lines cast lines_end to PIXEL* but one is apparently forgotten. This fixes a compiler warning about incompatible types in assignment.
* canvas_base: fix not caching palettes that belong to images that are not ↵Yonit Halperin2013-01-311-1/+18
| | | | | | | | | | | rendered Fixes: fedora 875348, 826036 When an image is not rendered, we still need to check if it contains a palette that needs to be cached. This bug caused the client to crash due to not finding palettes in the cache.
* Add a "port" channelMarc-André Lureau2012-12-052-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | A Spice port channel carry arbitrary data between the Spice client and the Spice server. It may be used to provide additional services on top of a Spice connection. For example, a channel can be associated with the qemu monitor for the client to interact with it, just like any qemu chardev. Or it may be used with various protocols, such as the Spice Controller. A port kind is identified simply by its fqdn, such as org.qemu.monitor, org.spice.spicy.test or org.ovirt.controller... The channel is based on Spicevmc which simply tunnels data between client and server. A few messages have been added: SPICE_MSG_PORT_INIT: Describes the port state and fqdn name, should be sent only once when the client connects. SPICE_MSG_PORT_EVENT: Server port event. SPICE_PORT_EVENT_OPENED and SPICE_PORT_EVENT_CLOSED are typical values when the chardev is opened or closed. SPICE_MSGC_PORT_EVENT: Client port event.
* common/lz.c: improve lz_encode commentAlon Levy2012-11-041-2/+3
|
* ssl-verify: use more explicit error messageMarc-André Lureau2012-10-181-0/+3
| | | | | | | | | | | | | When the server certificate is not being signed by the provided CA, the SSL debug message is currently for example: ssl_verify.c:428:openssl_verify: openssl verify:num=19:self signed certificate in certificate chain:depth=1:/C=IL/L=Raanana/O=Red Hat/CN=my CA Add a more explicit debug message too, as requested in bug: https://bugzilla.redhat.com/show_bug.cgi?id=846666
* build-sys: remove Makefile from marshaller build depMarc-André Lureau2012-08-281-1/+0
| | | | | | | | | The release tarballs ship with the generated files to avoid extra build work and dependency. However, build was still tiggering a regenration, because of Makefile change. Avoid required rebuild when running ./configure (generating Makefile), there is no variable that could be tweaked, afaict.
* support seamless migrationYonit Halperin2012-08-272-1/+15
| | | | | see spice-protocol for more details commit 3838ad140a046c4ddf42fef58c9727ecfdc09f9f
* add SPICE_MSG_MAIN_AGENT_CONNECTED_TOKENSYonit Halperin2012-08-271-0/+2
| | | | | The msg is used for setting the number of allocated client tokens when we notify the client that the agent is attached.
* Add support for A8 images to the LZ routinesSøren Sandmann Pedersen2012-08-2411-18/+261
| | | | | This format is needed to add Render support to the X driver, so we need the ability to compress and decompress it.
* canvas_utils: Make sure strides are aligned to multiple of 4Søren Sandmann Pedersen2012-08-131-0/+3
| | | | | Pixman requires all strides to be aligned to a multiple of 4. With the upcoming a8 images, this is not guaranteed anymore.
* build-sys: fix make distcheckMarc-André Lureau2012-07-161-1/+4
| | | | | - don't try to overwrite read-only enums.h - DIST_SUBDIRS is no longer needed
* support multiple monitors in single display channelAlon Levy2012-07-121-0/+16
| | | | | | See spice-protocol commit for details: da908f89b581fd4725da997fdaea209f8e6548f6 support multiple monitors on a single display channel
* spice-protocol/spice/enums.h: rebuild from spice.protoAlon Levy2012-07-081-1/+4
| | | | | | | | | | | | | | 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.
* common/log.h: add spice_infoAlon Levy2012-07-051-0/+6
|
* Fix a gcc warningMarc-André Lureau2012-06-301-3/+6
| | | | warning: suggest explicit braces to avoid ambiguous 'else'
* Fix invalid macro usageMarc-André Lureau2012-06-301-1/+1
|
* ssl: more verbose output when SSL verification failsChristophe Fergeau2012-06-251-9/+32
| | | | This should make SSL connection failures easier to diagnose.
* smartcard: build fixes for spice serverAlon Levy2012-06-141-1/+1
| | | | | | | 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.
* ssl-verify: add a bit of run-time checksMarc-André Lureau2012-05-171-0/+5
| | | | | Even if they are not public functions, those conditions can be reached in a invalid state.
* video streaming: add support for frames of different sizesYonit Halperin2012-05-021-1/+14
| | | | | | | | | 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.
* region: add region_extentsYonit Halperin2012-05-022-0/+13
|
* rect: add rect_debugYonit Halperin2012-05-021-0/+11
|
* rect: add rect_get_areaYonit Halperin2012-05-021-0/+10
|
* rect: add rect_containsYonit Halperin2012-05-021-0/+11
|
* Set the clip type to reflect the on wire type.Jeremy White2012-04-261-1/+1
|
* Add missing struct field initializersDaniel P. Berrange2012-04-252-4/+6
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* move variable decleration to head of code blockAric Stewart2012-04-181-1/+1
| | | | Signed-off-by: Aric Stewart <aric@codeweavers.com>
* allow log.c to compile under MSVC++Aric Stewart2012-04-181-0/+12
|
* add padding member to SpiceMsgEmptyAric Stewart2012-04-181-0/+1
| | | | | | | | 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>
* Add a return value to the default case in create_bitmap to satisfy VC++Aric Stewart2012-04-171-1/+1
|
* Bypass certicate verification failure if PUBKEY check onlyMarc-André Lureau2012-03-301-0/+7
| | | | | | | 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.
* ssl-verify: improve logging report in case of errorsMarc-André Lureau2012-03-301-30/+40
| | | | Use the log.h system, and report a bit more information in the debug level
* Fix harmless warnings in quic_encode()Marc-André Lureau2012-03-281-3/+3
| | | | | | | | | | | | | | | | 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.
* build-sys: split client marshallers in seperate libMarc-André Lureau2012-03-251-13/+16
|
* build-sys: make it a seperately buildable spice-common libraryMarc-André Lureau2012-03-227-28/+93
| | | | | | | - autotoolize - fix headers inclusion - generate gitignores - workaround serverSMARTCARD support with dirty hack...
* Add SPICE_ATTR_NORETURN and use it for a few functionsMarc-André Lureau2012-03-202-1/+10
|
* Fix build with SPICE_DISABLE_ABORTMarc-André Lureau2012-03-201-0/+1
|
* Remove need for SPICE_CANVAS_INTERNALMarc-André Lureau2012-03-208-32/+0
| | | | Why is this useful?
* fix void* arithmeticMarc-André Lureau2012-03-201-1/+1
| | | | marshaller.c:528:50: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]
* build: replace INCLUDES with AM_CPPFLAGSMarc-André Lureau2012-03-201-1/+1
| | | | Fix warning `INCLUDES' is the old name for `AM_CPPFLAGS' (or `*_CPPFLAGS')
* Add missing includes & make some functions staticDaniel P. Berrange2012-03-202-3/+3
| | | | | | | | | 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.
* Add printf format annotations to all '...' functionsDaniel P. Berrange2012-03-206-14/+16
| | | | | | | | | | 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
* Fix some integer range checks which always evaluate falseDaniel P. Berrange2012-03-201-2/+2
| | | | | | | | | 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. * common/pixman_utils.c: SpiceROP is an enum & thus unsigned
* Avoid warnings about empty conditional statement bodiesDaniel P. Berrange2012-03-201-6/+9
| | | | | | | | | | | | 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]