summaryrefslogtreecommitdiffstats
path: root/server/main_dispatcher.c
Commit message (Collapse)AuthorAgeFilesLines
* reds: support mm_time latency adjustmentsYonit Halperin2013-04-221-0/+32
| | | | | | | | When there is no audio playback, we set the mm_time in the client to be older than the one in the server by at least the requested latency (the delta is actually bigger, due to the network latency). When there is an audio playback, we adjust the mm_time in the client by adjusting the playback buffer using SPICE_MSG_PLAYBACK_LATENCY.
* seamless migration: migration completion on the destination sideYonit Halperin2012-08-271-0/+32
| | | | | | Tracking the channels that wait for migration data. If there is a new migration process pending, when all the channels have restored their state, we begin the new migration.
* server, separate SpiceChannelEventInfo from RedStreamAlon Levy2012-02-151-0/+3
| | | | | | | | | | fixes rhbz 790749 use after free of SpiceChannelEventInfo. The lifetime of the SpiceChannelEventInfo was that of RedsStream, but it is used by main_dispatcher_handle_channel_event after the RedsStream is freed for the cursor and display channels. Making SCEI allocation be at RedsStream allocation, and deallocation after the DESTROY event is processed by core->channel_event, fixes use after free.
* Add missing includes of config.hDaniel P. Berrange2012-01-131-0/+1
| | | | Not all files were including config.h
* Remove unused assert.h includeDaniel P. Berrange2012-01-131-1/+0
| | | | The assert.h include was never used in any code
* server: introduce dispatcherAlon Levy2011-11-081-75/+27
| | | | | | | | | | | | | | | | | | | | | | | | used for main_dispatcher only in this patch. Dispatcher is meant to be used for Main<->any low frequency messages. It's interface is meant to include the red_dispatcher usage: fixed size messages per message type some messages require an ack Some methods are added to be used by RedDispatcher later: dispatcher_handle_read - to be called directly by RedDispatcher epoll based loop dispatcher_set_opaque - to be set from red_worker pthread dispatcher_init - allow NULL core as used by red_worker Read and Write behavior: Sender: blocking write, blocking read for ack (if any). Reader: poll for any data, if such then blocking read for a message_type and following message. repeat until poll returns with no pending data to read. FDO Bugzilla: 42463
* [0.8 branch] server: add main_dispatcherAlon Levy2011-10-311-0/+145
add main_dispatcher, a message passing mechanism for sending messages to the main thread. The main thread is the thread that implements SpiceCoreInterface, which is assumed to be a single thread. Similar to the async operation of red_worker, a socket pair is created and used to pass messages. The messages are a fixed size to ease parsing. A single message is defined to pass a channel_event. RHBZ: 746950 FDBZ: 41858 This patch is 0.8 branch only, for the master branch there should be a better approach to share code with red_dispatcher and ready the way for later adding more threads. cherry-pick from 0.8 80caf07e09efe14c67f89a3c01501a6a39681167 Conflicts: server/reds.c