Commit Graph

1448 Commits

Author SHA1 Message Date
Alon Levy
341d273bad server/red_parse_qxl: get_path: remove return NULL
introduced by 2ec2dbc78a
2012-07-22 13:37:44 +03:00
Alon Levy
9aa630b4d7 server/reds: more fixes for wrong spice_error in d2c99b59 2012-07-22 13:34:11 +03:00
Alon Levy
b8ccb7da65 server: don't abort on guest images with missing palettes 2012-07-22 11:58:36 +03:00
Alon Levy
d478037404 server: factor out bitmap_fmt_is_rgb 2012-07-22 11:58:36 +03:00
Marc-André Lureau
acdb67b4d2 Update spice-common 2012-07-16 17:36:53 +02:00
Marc-André Lureau
4e7f071e6f tests: add missing file to .gitignore
TODO: some day, switch to git.mk
2012-07-16 17:36:52 +02:00
Marc-André Lureau
e234982a44 build-sys: remove cegui/slirp and mandatory client from dist-check
The spicec client is no longer actively maintained.

By removing cegui from distcheck, we can avoid extra build time and
dependencies (>150Mb extra cegui/boost on fedora)

Slirp is not available in most distributions, afaict, making it hard
to build consistantly accross various systems.

The client is still build if the dependencies are present.
2012-07-16 17:36:52 +02:00
Marc-André Lureau
52c3fb03b7 build-sys: define GL flags if enabled
The server too can use opengl, independently from client.
2012-07-16 17:36:52 +02:00
Alon Levy
d7968ee500 server/reds: fix wrong spice_error in d2c99b59 2012-07-11 14:41:33 +03:00
Alon Levy
75a49edce3 server/red_worker: fix wrong spice_error in commit 706232a8 2012-07-11 14:41:06 +03:00
Alon Levy
d2c99b59b0 server/reds.c: spice_printerr cleanup
Rules for replacing spice_printerr:
* if it's a client drop / agent drop, spice_error
* if it's important, spice_warning
* else, spice_info.

The fourth rule is spice_debug if it's going to fill up the log, but
nothing of the sort here.

Other things this patch does:
* changed reds_show_new_channel to reds_info_new_channel in an attempt to
advertise it doesn't always show anything, unless SPICE_DEBUG_LOG_LEVEL
>= SPICE_DEVUG_LOG_INFO (==3)
* removes two lines of whitespace.
* added "crashy" to multiple client warning (only warning introduced,
  the rest are errors).
2012-07-05 19:42:23 +03:00
Alon Levy
706232a81a server/red_worker: elevate some spice_debugs to spice_info
Specifically all those that the previous patch converted to spice_debug.
spice_debug contains very verbose stuff like update_area that drowns out
those relatively rare (client connect / disconnect generated) messages.
2012-07-05 19:42:23 +03:00
Alon Levy
981f76a11d update spice-common for spice_info 2012-07-05 19:42:23 +03:00
Alon Levy
8ee952ef45 server/red_worker: cleanup lines starting with 5 spaces 2012-07-05 19:42:23 +03:00
Alon Levy
afdb456133 server/red_worker: death to spice_printerr, too verbose by far
Replaced mostly with spice_debug, but spice_warning & spice_error as
well where appropriate.
2012-07-05 13:42:27 +03:00
Yonit Halperin
ffcbf2a668 smartcard: Remove redefinition of typedef 'SmartCardDeviceState' 2012-07-04 11:16:01 +03:00
Yonit Halperin
10a8c28b95 char_device.h: Remove redefinition of typedef 'SpiceCharDeviceState'
The original definition is in spice.h
2012-07-03 22:29:16 +03:00
Yonit Halperin
bf91bdce5c char_device: move SpiceCharDeviceState from the header
In addition, I also removed the no longer used wakeup callback
2012-07-03 14:13:43 +03:00
Yonit Halperin
8bb444ec7a smartcard: use SpiceCharDeviceState for writing to the guest device
With SpiceCharDeviceState, the smartcard code now supports partial writes,
and storing data that is received from the client after the device is
stopped, instead of attempting to write it to the guest.
2012-07-03 14:13:43 +03:00
Yonit Halperin
6071c1c8c5 smartcard: creating SmartCardChannelClient type
The lifetime of the channel is not necessarily correlated to the life
time of the device. In the next patch, we need to keep a reference
to SpiceCharDeviceWriteBuffer, which might be in use even if the
SpiceCharDeviceState is destroyed, but the channel is still connected.
The next patch keeps this reference inside SmartCardChannelClient.

This patch also removes the routine smartcard_readers_detach_all(rcc), which
is unnecessary since we don't support multiple readers; even when
we do support them, each channel client should be associated with only
one reader (i.e., we will have different channels for different
readers).
2012-07-03 14:13:43 +03:00
Yonit Halperin
c514a1d903 smartcard: use SpiceCharDeviceState for managing reading from the device
This patch and the following one do not introduce tokening to the smartcard
channel. But this can be done easily later, by setting the appropriate
variables in SpiceCharDeviceState (after adding the appropriate protocol messages,
and implementing this in the client side).
2012-07-03 14:13:42 +03:00
Yonit Halperin
7305a4b06f spicevmc: use SpiceCharDeviceState for writing to the guest device
With SpiceCharDeviceState, spicevmc now supports partial writes,
and storing data that is received from the client after the device is
stopped, instead of attempting to write it to the guest.
2012-07-03 14:13:42 +03:00
Yonit Halperin
da7114d751 spicevmc: employ SpiceCharDeviceState for managing reading from the guest device
This patch and the following one do not introduce tokening to the
spicevmc channel. But this can be done easily later, by setting the appropriate
variables in SpiceCharDeviceState (after adding
the appropriate protocol messages, and implementing this in the client
side).
2012-07-03 14:13:42 +03:00
Yonit Halperin
bc93d5455c agent: employ SpiceCharDeviceState for writing to the device 2012-07-03 14:13:42 +03:00
Yonit Halperin
e88f03f16b agent: use SpiceCharDeviceWriteBuffer for agent data from the client
This is an intermediate patch. The next patch will actually
push the buffer to the device, instead of copying it.
2012-07-03 14:13:41 +03:00
Yonit Halperin
bf1d9007b4 agent: employ SpiceCharDeviceState for managing reading from the device 2012-07-03 14:13:41 +03:00
Yonit Halperin
80145817ae agent: remove save/restore migration data code
This code is never called, it was relevant for seamless migration.
Most of the data that needs to be migrated was moved to
SpiceCharDeviceState. When we implement seamless migration,
we will have routines in char_device.c for migrating the relevant data.
2012-07-03 14:13:41 +03:00
Yonit Halperin
fffa38672c agent: Fix tokens handling in main_channel
- Allow sending tokens to a specific client.
- Do not ignore tokens that are sent from the client to the server.

The tokens support for multiple clients and for server side tokens
is still broken in reds. It will be fixed in following patches, when
the server-side agent code will use the SpiceCharDeviceState api.

Notice that ignoring the server-side tokens didn't introduce a problem
since both the client and the server set it to ~0.
2012-07-03 14:13:41 +03:00
Yonit Halperin
50e3af6a99 char_device: Introducing shared flow control code for char devices.
SpiceCharDeviceState manages the (1) write-to-device queue
(2) wakeup and reading from the device (3) client tokens (4)
sending messages from the device to the client/s, considering the
available tokens.
SpiceCharDeviceState can be also stopped and started. When the device
is stopped, no reading or writing is done from/to the device. Messages
addressed from the client to the device are being queued.
Later, an api for stop/start will be added to spice.h and it should
be called from qemu.

This patch does not yet remove the wakeup callback from
SpiceCharDeviceState, but once all the char devices (agent/spicevmc/smartcard)
code will switch to the new implementation, SpiceCharDeviceState
will be moved to the c file and its reference to the wakeup callback will be removed.
2012-07-03 14:13:41 +03:00
Yonit Halperin
713505c800 smartcard: fix an error message 2012-07-03 14:13:40 +03:00
Yonit Halperin
b468f14e23 smartcard: fix calc of remaining data size when reading more than one msg from the device 2012-07-03 14:13:40 +03:00
Alon Levy
3a4d54273b update spice-common
Includes using the same spice.proto as spice-gtk now, with smartcard
fixes, more verbose output when SSL verification fails, and some
warnings fixes. shortlog:

Alon Levy (6):
      python_modules/ptypes.py/EnumBaseType.c_enumname: add missing return to fix broken enums generation
      smartcard: build fixes for spice server
      updated spice-protocol for smartcard enums non conflict with libcacard
      Makefile.am: fix .gitignore not being generated in spice-protocol/spice
      Makefile.am: now that spice_codegen.py is used add *.pyc to ignored files in root
      update spice-protocol for smartcard enums fix

Christophe Fergeau (1):
      ssl: more verbose output when SSL verification fails

Marc-André Lureau (3):
      ssl-verify: add a bit of run-time checks
      Fix invalid macro usage
      Fix a gcc warning
2012-07-02 13:57:43 +03:00
Alon Levy
4b8dd71917 spice.h: bump SPICE_SERVER_VERSION for release 0.11.0
(cherry picked from commit dd5c995c32)
2012-06-27 17:29:55 +03:00
Alon Levy
d16b65b7d5 Revert "update spice-common for multiple monitor in single display channel support"
This reverts commit 3baf290be7.
2012-06-27 17:12:15 +03:00
Alon Levy
343b3b43b3 Revert "spice.h: bump SPICE_SERVER_VERSION for release 0.11.0"
This reverts commit dd5c995c32.
2012-06-27 17:12:03 +03:00
Alon Levy
dd5c995c32 spice.h: bump SPICE_SERVER_VERSION for release 0.11.0 2012-06-21 16:08:04 +03:00
Alon Levy
3baf290be7 update spice-common for multiple monitor in single display channel support 2012-06-21 16:06:45 +03:00
Nikolay Orlyuk
95253b0fb5 Added configure option --disable-xinerama
This parameter was added to be able to control dependency on
libXinerama. Which is really useful for package managers.
Fixes bug #51192
2012-06-19 11:56:28 +02:00
Alon Levy
5cbffe794f Release 0.11.0
Current bumped and age bumped for new intefaces only (no backward
incompatible changes).

New libtool version is 2.0.1, using --version-info instead of
--version-name. Doing the version change and --version-name to
--version-info change here to avoid changing the libtool version twice.

Added interfaces:
    spice_server_set_name
    spice_server_set_uuid
    spice_server_set_listen_socket_fd
    spice_server_is_server_mouse

New library name in linux:
    libspice-server.so.1.1.0
Old:
    libspice-server.so.1.0.2
2012-06-12 17:55:28 +03:00
Alon Levy
2465a8d801 server/red_channel: s/channle/channel 2012-06-07 12:26:05 +03:00
Alon Levy
d905a1f24c m4/spice-compile-warnings: Squelch _FORTIFY_SOURCE when needed to avoid glibc #warnings.
Fix copied from libvirt, commit by Eric Blake.

glibc 2.15 (on Fedora 17) coupled with explicit disabling of
optimization during development dies a painful death:

/usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]

Work around this by only conditionally defining _FORTIFY_SOURCE,
in the case where glibc can actually use it.  The trick is using
AH_VERBATIM instead of AC_DEFINE.
2012-06-06 17:32:02 +03:00
Alon Levy
70c706e0b5 server/spice.h: s/Pleaes/Please/ 2012-06-05 15:44:36 +03:00
Yonit Halperin
858a1aaa34 server/red_channel: do not attempt to write if the channel client is disconnected
The red_channel_client_event call to red_channel_client_receive might result
in a disconnected channel client. The following call to
red_channel_client_push may call to red_peer_handle_outgoing with a
disconnected socket.
2012-05-31 09:58:02 +03:00
Yonit Halperin
2d2121a170 server/red_channel: fix possible access to released channel clients
Added ref count for RedChannel and RedChannelClient.

red_channel.c/red_peer_handle_incoming call to
handler->cb->handle_message might lead to the release of the channel
client, and the following call to handler->cb->release_msg_buf will be
a violation.

This bug can be produced by causing main_channel_handle_parsed
call red_client_destory, e.g., by some violation in
reds_on_main_agent_data that will result in a call to reds_disconnect.
2012-05-31 09:39:14 +03:00
Yonit Halperin
d691602784 server/red_worker: fix red_wait_pipe_item_sent
Resolves: rhbz#824384

red_wait_pipe_item_sent mistakingly returned without waiting for sending the given pipe item
when the channel wasn't blocked. As a result, we failed when we had to
destroy a surface (e.g., QXL_IO_DESTROY_ALL_SURFACES) and to release all
the drawables that are depended on it (by removing them or waiting they will be sent).
In addition, red_wait_pipe_item_sent increased and decreased the reference to the pipe item
using channel_cbs->hold_item, and channel_cbs->release_item. However,
these calls can be called only by red_channel, otherwise
display_channel_client_release_item_before_push is called twice and
leads to a double call to ring_remove(&dpi->base).
Instead ref/put_drawable_pipe_item should be called.
2012-05-24 11:23:00 +03:00
Yonit Halperin
c59b2884a2 server/red_channel: remove red_channel_client_item_being_sent
The above routine was risky, since red_channel_client_init_send_data
can also be called with item==NULL. Thus, not all pipe items can be tracked.
The one call that was made for this routine was not necessary.
2012-05-24 11:00:33 +03:00
Yonit Halperin
038ae54b1c server: handle red_channel_client_create returning NULL 2012-05-21 09:08:50 +03:00
Yonit Halperin
1b9162b5cf server/red_channel: prevent creating more than one channel client with the same type+id 2012-05-21 09:08:42 +03:00
Yonit Halperin
720d316153 server/video: do not allow non-streamable drawables be stream candidates
Resolves: rhbz#820669

Fix a segfault caused by a call to __red_is_next_stream_frame made by
red_stream_maintenance, with a drawable that is not a DRAW_COPY one.
The segfault is a reault of __red_is_next_stream_frame accessing
red_drawable->u.copy.src_bitmap for a non DRAW_COPY drawable.
2012-05-21 08:58:38 +03:00
Yonit Halperin
dd0d4959bb server/tests: test_display_streaming - test wide sized frames
Before, we tested only higher frames, while wider frames would have
triggered a bug in mjpeg_encoder, when spice is linked with libjpeg and
not libjpeg-turbo.
2012-05-16 08:55:11 +03:00