summaryrefslogtreecommitdiffstats
path: root/server
Commit message (Collapse)AuthorAgeFilesLines
* Add support for QXLComposite to spice serverSøren Sandmann Pedersen2012-08-244-2/+164
| | | | | | In red-parse-qxl.c add support for parsing QXLComposite into SpiceComposite. In red-worker.c add support for marshalling SpiceComposite onto the wire.
* Add support for LZ compression of A8 imagesSøren Sandmann Pedersen2012-08-243-10/+17
| | | | | | Graduality is irrelevant for A8 images, so instead of using RGB-ness as a short-cut, add a new macro BITMAP_FMT_HAS_GRADUALITY() that returns true for the existing RGB images, but false for A8.
* red_worker: Fix reference counting for the current frame (drawable) of a streamYonit Halperin2012-07-251-15/+1
| | | | | | | | | | | | | | | | | After marshalling MSG_STREAM_CREATE, there is no need to ref and unref stream->current before and after completing the sending of the message (correspondingly). The referencing is unnecessary because all the data that is required from the drawable (the clipping), is copied during marshalling, and no field in the drawable is referenced (see spice_marshall_msg_display_stream_create). Moreover, the referencing was bugous: While display_channel_hold_pipe_item and display_channel_client_release_item_after_push referenced and dereferenced, correspondingly, stream->current, stream->current might have changed in between these calls, and then we ended up with one drawable leaking, and one drawable released before its time has come (which of course led to critical errors).
* bump version to 0.11.1 for new spice_qxl_monitors_config_asyncAlon Levy2012-07-231-1/+1
| | | | | bump current and age since only additions where done. new server library is libspice-server.so.1.2.0 .
* server: add monitors_config supportAlon Levy2012-07-226-1/+285
| | | | | | | | | | | | | | | | a SpiceMsgDisplayMonitorsConfig is sent on two occasions: * as a result of a spice_qxl_monitors_config_async * whenever a client connects and there is a previously set monitors config Sending the new message is protected by a new cap, SPICE_DISPLAY_CAP_MONITORS_CONFIG More elaborately: spice_qxl_monitors_config_async receives a QXLPHYSICAL address of a QXLMonitorsConfig struct and reads it, caching it in the RedWorker, and sending it to all clients. Whenever a new client connects it receives a SpiceMsgDisplayMonitorsConfig message as well.
* server/red_parse_qxl: red_get_image: fix leaks on bad imageAlon Levy2012-07-221-8/+16
|
* server/red_worker: release bad drawablesAlon Levy2012-07-221-3/+2
|
* server/red_parse_qxl: disallow zero area bitmapsAlon Levy2012-07-221-0/+4
| | | | | | prevents division by zero later (SIGFPE, Arithmetic exception) in spice-common code, at spice-common/common/canvas_base.c:646 for both client and server (server only upon rendering).
* server/red_parse_qxl: get_path: remove return NULLAlon Levy2012-07-221-1/+0
| | | | introduced by 2ec2dbc78a660ee4e3315f50c881d9e31a8e4fe2
* server/reds: more fixes for wrong spice_error in d2c99b59Alon Levy2012-07-221-68/+68
|
* server: don't abort on guest images with missing palettesAlon Levy2012-07-222-0/+13
|
* server: factor out bitmap_fmt_is_rgbAlon Levy2012-07-222-8/+19
|
* tests: add missing file to .gitignoreMarc-André Lureau2012-07-161-0/+1
| | | | TODO: some day, switch to git.mk
* server/reds: fix wrong spice_error in d2c99b59Alon Levy2012-07-111-26/+26
|
* server/red_worker: fix wrong spice_error in commit 706232a8Alon Levy2012-07-111-16/+16
|
* server/reds.c: spice_printerr cleanupAlon Levy2012-07-051-148/+146
| | | | | | | | | | | | | | | | | | 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).
* server/red_worker: elevate some spice_debugs to spice_infoAlon Levy2012-07-051-52/+52
| | | | | | 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.
* server/red_worker: cleanup lines starting with 5 spacesAlon Levy2012-07-051-13/+13
|
* server/red_worker: death to spice_printerr, too verbose by farAlon Levy2012-07-051-91/+91
| | | | | Replaced mostly with spice_debug, but spice_warning & spice_error as well where appropriate.
* smartcard: Remove redefinition of typedef 'SmartCardDeviceState'Yonit Halperin2012-07-041-2/+2
|
* char_device.h: Remove redefinition of typedef 'SpiceCharDeviceState'Yonit Halperin2012-07-031-2/+0
| | | | The original definition is in spice.h
* char_device: move SpiceCharDeviceState from the headerYonit Halperin2012-07-033-32/+27
| | | | In addition, I also removed the no longer used wakeup callback
* smartcard: use SpiceCharDeviceState for writing to the guest deviceYonit Halperin2012-07-031-22/+93
| | | | | | 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.
* smartcard: creating SmartCardChannelClient typeYonit Halperin2012-07-031-50/+56
| | | | | | | | | | | | | | 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).
* smartcard: use SpiceCharDeviceState for managing reading from the deviceYonit Halperin2012-07-033-45/+133
| | | | | | | 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).
* spicevmc: use SpiceCharDeviceState for writing to the guest deviceYonit Halperin2012-07-031-25/+24
| | | | | | 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.
* spicevmc: employ SpiceCharDeviceState for managing reading from the guest deviceYonit Halperin2012-07-033-32/+118
| | | | | | | | 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).
* agent: employ SpiceCharDeviceState for writing to the deviceYonit Halperin2012-07-031-211/+44
|
* agent: use SpiceCharDeviceWriteBuffer for agent data from the clientYonit Halperin2012-07-033-1/+45
| | | | | This is an intermediate patch. The next patch will actually push the buffer to the device, instead of copying it.
* agent: employ SpiceCharDeviceState for managing reading from the deviceYonit Halperin2012-07-033-124/+228
|
* agent: remove save/restore migration data codeYonit Halperin2012-07-031-250/+2
| | | | | | | 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.
* agent: Fix tokens handling in main_channelYonit Halperin2012-07-034-24/+46
| | | | | | | | | | | | - 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.
* char_device: Introducing shared flow control code for char devices.Yonit Halperin2012-07-033-0/+954
| | | | | | | | | | | | | | | | | 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.
* smartcard: fix an error messageYonit Halperin2012-07-031-1/+1
|
* smartcard: fix calc of remaining data size when reading more than one msg ↵Yonit Halperin2012-07-031-1/+1
| | | | from the device
* spice.h: bump SPICE_SERVER_VERSION for release 0.11.0Alon Levy2012-06-271-1/+1
| | | | (cherry picked from commit dd5c995c32cf595d31e59975bd1b3216cf996656)
* Revert "spice.h: bump SPICE_SERVER_VERSION for release 0.11.0"Alon Levy2012-06-271-1/+1
| | | | This reverts commit dd5c995c32cf595d31e59975bd1b3216cf996656.
* spice.h: bump SPICE_SERVER_VERSION for release 0.11.0Alon Levy2012-06-211-1/+1
|
* Release 0.11.00.11.0Alon Levy2012-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | 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
* server/red_channel: s/channle/channelAlon Levy2012-06-071-3/+3
|
* server/spice.h: s/Pleaes/Please/Alon Levy2012-06-051-1/+1
|
* server/red_channel: do not attempt to write if the channel client is ↵Yonit Halperin2012-05-311-0/+4
| | | | | | | | | 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.
* server/red_channel: fix possible access to released channel clientsYonit Halperin2012-05-312-20/+104
| | | | | | | | | | | | | 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.
* server/red_worker: fix red_wait_pipe_item_sentYonit Halperin2012-05-241-7/+5
| | | | | | | | | | | | | | | 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.
* server/red_channel: remove red_channel_client_item_being_sentYonit Halperin2012-05-243-31/+1
| | | | | | 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.
* server: handle red_channel_client_create returning NULLYonit Halperin2012-05-216-2/+16
|
* server/red_channel: prevent creating more than one channel client with the ↵Yonit Halperin2012-05-211-4/+46
| | | | same type+id
* server/video: do not allow non-streamable drawables be stream candidatesYonit Halperin2012-05-211-0/+4
| | | | | | | | | 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.
* server/tests: test_display_streaming - test wide sized framesYonit Halperin2012-05-161-3/+8
| | | | | | 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.
* server/mjpeg_encoder: realloc encoder->row, when a wider frame is givenYonit Halperin2012-05-161-2/+8
| | | | | | | | Fix crashes when there are sized wider frames in the stream, and we are linked with libjpeg. Related : rhbz#813826 Resolves: rhbz#820669