Commit Graph

405 Commits

Author SHA1 Message Date
Christophe Fergeau
d8e49b71d4 mi: Avoid stack smash when drawing dashed lines
Based off Peter Harris's xserver commit
http://cgit.freedesktop.org/xorg/xserver/commit/mi/miwideline.c?id=20c2a3bcb11b5baf564e2c73a477ba23f5ae2b10
2014-01-07 13:55:51 +01:00
Christophe Fergeau
ead4b8810a quic: Add missing break; in switch/case
Unhandled values call an error callback, and then fall through the default:
case, which will call again the error callback. This commit adds some
break; after these cases to avoid this.
2014-01-07 13:55:51 +01:00
Christophe Fergeau
793e5d0350 backtrace: Don't attempt to call seteuid(0)
We are mostly likely not running as root, so this call will fail. As we are
supposed to check its return value as it's declared with
warn_unused_result, the current way of using it is wrong, so this commit just
removes the call.
2014-01-07 13:55:50 +01:00
Christophe Fergeau
6674e1c136 Remove unused variable
It was assigned a value, but then the value was never used.
2014-01-07 13:55:50 +01:00
Jeremy White
57ce430ccd Add support for the Opus codec.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
2014-01-02 12:28:21 +01:00
Jeremy White
c108e4ee8c Add a snd_codec interface to abstract the use of audio codecs such as celt.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
2014-01-02 12:25:23 +01:00
Marc-André Lureau
261d270cc8 Update spice-protocol 2013-11-19 17:46:56 +01:00
Jonathon Jongsma
1450bb4ddb Be explicit about spice-common license
Use same license as spice-gtk and spice modules (LGPL 2.1) since those licenses
applied to the spice-common submodule in the past.  This makes it more clear
that if you use spice-common separately, the license is still LGPL.  Also
mention license and copyright in generated files.
2013-10-23 11:41:43 -05:00
Jonathon Jongsma
31ef0c626d codegen: Add a --generate-wireshark-dissector option
The wireshark protocol dissector is a bit out-of-date. Several new channel types
and enums have been added.  It would be nice if these values (and the
translation between the value and the name) could be automatically generated so
that updating the dissector was a slightly less manual process.  This patch adds
a commandline switch which generates both the enums and value-name lists in the
format that wireshark expects.
2013-10-23 11:41:43 -05:00
Christophe Fergeau
fa640286f4 ssl: Don't try hostname check if cert subject check fails
Currently, SSL verification of the peer certificate checks if
the certificate's subject CN or one of its subjectAltName match
the hostname. If this succeeds, then the verification succeeds.
Otherwise openssl_verify() checks the cert subject if this was set,
which means it checks the certificate's subject (not just its CN) matches
exactly the cert subject string that is set in SpiceSession.

Given that the cert subject is something the user specifies in addition
to the hostname, the cert subject check should have priority over the
hostname check, that is, when we have a cert subject set, the
success/failure of the cert subject cert should determine the
success/failure of openssl_verify(), and the hostname check
should only be carried out when no cert subject was set.

This fixes rhbz#871034
2013-10-11 10:21:54 +02:00
Christophe Fergeau
9b3e972cdc ssl: Log an error when peer certificate verification failed
We currently log an error when openssl_verify() is called with
preverify_ok set to 0 for all certificates in the certificate chain
except for the peer certificate (when 'depth' is 0).
This commit logs an error in the latter case as well.
2013-10-11 10:21:54 +02:00
Christophe Fergeau
b34169feb6 ssl: Improve error message in cert chain verification
It contains the same information as before, but should be more readable.
2013-10-11 10:21:54 +02:00
Marc-André Lureau
7e8ba10779 Remove INLINE usage
Since inline is c99 and its already used in some files
2013-10-04 12:45:00 +02:00
Marc-André Lureau
e443c9f603 gl: use glCopyPixels()
I don't see why the fallback method should be the default.

glCopyTexImage2D and glCopyPixels are equally broken with current Intel
mesa/drivers (I'll be filing a bug). But sw rendering is correct.
2013-09-30 02:18:37 +02:00
Marc-André Lureau
0aadda70d5 gl: cope with positive stride in put_image()
Keeping the warning, because I don't think this should happen anyway.
2013-09-30 02:18:37 +02:00
Marc-André Lureau
b6faccb381 gl: ignore alpha channel in draw_copy
Similar to sw canvas blit copy operation, and not a blend.
2013-09-30 02:18:37 +02:00
Marc-André Lureau
370ba35339 gl: ignore if mask has not bitmap
Similar to how sw canvas ignore mask if !bitmap in canvas_mask_pixman().
2013-09-30 02:18:37 +02:00
Marc-André Lureau
f88e851ed6 build-sys: add --enable-smartcard=auto
Use same implementation as spice-gtk, to avoid need to explicitely set
smartcard support
2013-09-26 19:03:31 +02:00
Marc-André Lureau
3363fe79f9 Update spice-protocol 2013-09-12 13:52:27 +02:00
Marc-André Lureau
4857653686 quic: precompute golomb codes
We can avoid repetitive computation by using two precomputed array, of
8k each.

before:
     1.79%  lt-spicy-stats  libspice-client-glib-2.0.so.8.4.0  [.]
     golomb_code_len_8bpc

after:
     0.79%  lt-spicy-stats  libspice-client-glib-2.0.so.8.4.0  [.]
     golomb_code_len_8bpc
2013-09-12 13:49:25 +02:00
Marc-André Lureau
8db88d2854 quic: compile with constant bpp
This simplifies a little bit function calling, and allows for compiler
to potentially specialize and optimize a bit better each version.
2013-09-12 13:49:25 +02:00
Marc-André Lureau
a7b93bd43d canvas: use precomputed revers_bits
Thos function shows up in some profiling results, it seems we can
trivially replace it with a precomputed array of 256bytes.

before:
     5.66%           691  lt-spicy-stats
libspice-client-glib-2.0.so.8.4.0  [.] revers_bits

after:
     0.53%            64  lt-spicy-stats
libspice-client-glib-2.0.so.8.4.0  [.] revers_bits
2013-09-12 13:49:25 +02:00
Marc-André Lureau
6440a1e533 proto: add fake last message in base channel
Make it explicit that 100 is the last value of the base channel
messages. This allows clients to use the generated enum value too.
2013-09-12 13:49:25 +02:00
Marc-André Lureau
4d8d2b6124 proto: comment future surface flags usage 2013-09-12 13:49:25 +02:00
Christophe Fergeau
ffc3e8a327 Fix min gcc version for __attribute__(format)
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
2013-08-20 10:38:07 +02:00
Uri Lublin
fe93908238 Update spice-protocol to 0.12.6 2013-07-10 17:53:20 +03:00
Hans de Goede
fc27fb20b8 Update spice-protocol
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-06-24 13:27:37 +02:00
Yonit Halperin
30e84783ca add SPICE_MSG_PLAYBACK_LATENCY
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.
2013-04-22 11:34:49 -04:00
Yonit Halperin
7cdf8de00a add stream report messages
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.
2013-04-22 11:34:20 -04:00
Christophe Fergeau
5ebeee5114 Add compile-time check for lz arrays
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.
2013-04-10 09:53:51 +02:00
Laszlo Ersek
5aa31e753f supply missing IS_IMAGE_TYPE_* elements for LZ_IMAGE_TYPE_A8
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>
2013-04-10 09:53:51 +02:00
Yonit Halperin
b52948d792 region.c: fix region_bounds_intersects
region_bounds_intersects mistakingly ignored one of the input regions,
and compared the other region to itself.
2013-04-02 08:45:42 -04:00
Hans de Goede
063f4dd385 Update spice-protocol
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-03-07 11:50:42 +01:00
Hans de Goede
1a83284e9c Update spice-protocol
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-03-04 19:41:59 +01:00
Michael Tokarev
149bb89adb Address a compilation warning due to missing typecast
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.
2013-02-07 19:49:18 +01:00
Michael Tokarev
9ffc614a6c spice-common: remove version construction
Version string isn't used anywhere in spice-common, and there's
no version for spice-common module per se, either.  Hoever,
configure.ac has this:

 AC_INIT([spice-common],
         [m4_esyscmd(build-aux/git-version-gen .tarball-version)],
         [spice-devel@lists.freedesktop.org])

But since git-version-gen script is not provided in spice-common
module, multiple error messages are produced when generating
configure (running autogen/autoreconf), like this:

  sh: ./build-aux/git-version-gen: not found

(repeated about 50 times).

The following trivial patch removes usage of build-aux/git-version-gen
from AC_INIT and replaces it with a string "noversion", to stop
these scary messages from being produced.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-02-07 19:33:14 +01:00
Yonit Halperin
df09927c3b canvas_base: fix not caching palettes that belong to images that are not 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.
2013-01-31 11:55:37 -05:00
Marc-André Lureau
c08e04b478 spice-protocol: updated submodule for new PROXY controller message 2013-01-28 15:44:54 +01:00
Hans de Goede
8a10919658 spice-common: Update spice-protocol to include VD_AGENT_CAP_SPARSE_MONITORS_CONFIG
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-01-18 14:26:49 +01:00
Dunrong Huang
81f40cca5f Update spice-protocol 2013-01-11 21:57:43 +01:00
Marc-André Lureau
b46d36bc1c Add a "port" channel
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.
2012-12-05 11:24:05 +01:00
Marc-André Lureau
5f2e99c3da update spice-protocol 2012-12-05 11:24:05 +01:00
Alon Levy
be6392a5ad common/lz.c: improve lz_encode comment 2012-11-04 13:33:35 +02:00
Marc-André Lureau
8543d04cd2 ssl-verify: use more explicit error message
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
2012-10-18 21:20:54 +02:00
Christophe Fergeau
222607814f Update spice-protocol submodule to 0.12.2 2012-09-21 15:53:09 +02:00
Christophe Fergeau
79502376d1 Update git.mk to latest version 2012-09-21 10:51:17 +02:00
Alon Levy
9b9592f80c Update spice-protocol module
Add support for client monitors config in qxl device.
2012-09-12 21:07:40 +03:00
Christophe Fergeau
f67bcd03e9 Update spice-protocol submodule
We need the latest spice-protocol to compile spice to get the A8
surface definitions
2012-09-10 10:45:26 +02:00
Marc-André Lureau
04dc2bee9e build-sys: remove Makefile from marshaller build dep
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.
2012-08-28 20:36:41 +02:00
Marc-André Lureau
86e286ba20 inputs: add a INPUTS_KEY_SCANCODE message
Add a new arbitrary keyboard scancodes message.

For now, it will be used to avoid unwanted key repeatition when there
is jitter in the network and too much time between DOWN and UP
messages, instead the client will send the press & release scancode in
a sequence.

See also: https://bugzilla.redhat.com/show_bug.cgi?id=812347
2012-08-27 17:12:07 +02:00