[Spice-devel] [PATCHv2 00/13] split inputs channel

Alon Levy alevy at redhat.com
Tue Dec 7 04:44:22 PST 2010


This patchset is the beginning of reusing red_channel.h's RedChannel for
most of the channels we have. In this patchset the inputs channel is split,
then red_channel is augmented to work with spice parser type (from marshaller,
used by inputs), and finally inputs is made to use red_channel.h
It also includes a small fix for keyboard modifier callback after channel
disconnection.

v1->v2: (Hans review)
 * added check to red_channel for NULL returning alloc buf callback.
 * added check for size of requested buf in inputs
 * folded back free from later patch into "use red_channel" patch
 * moved spice_marshaller_destroy to release function

Alon Levy (13):
  server/reds: fix typo
  server: introduce inputs_channel, split from reds.c
  server: inputs_channel: s/inputs_state/inputs_channel/
  server: red_channel: add optional parser and separate
    incoming/outgoing error handlers for later inputs/main channel
    usage
  server: inputs_channel: use red_channel
  server: reds/inputs_channel: move some structs to inputs_channel
  server/inputs_channel: initialize inputs_channel to NULL
  server/inputs_channel: s/inputs_channel/g_inputs_channel/
  server/inputs_channel: remove unused declaration in inputs_channel.h
  server/red_channel: add red_channel_is_connected
  server/inputs_channel: better protection from channel disconnection
    on keyboard modifiers callback
  server/red_channel: error channel if alloc_msg_buf fails (returns
    NULL)
  server/inputs: return NULL on alloc_buf request for too large message

 server/Makefile.am      |    1 +
 server/inputs_channel.c |  553 +++++++++++++++++++++++++++++++++++++++++++
 server/inputs_channel.h |   39 +++
 server/red_channel.c    |   90 +++++++-
 server/red_channel.h    |   32 +++
 server/reds.c           |  598 ++++-------------------------------------------
 server/reds.h           |   20 +-
 7 files changed, 768 insertions(+), 565 deletions(-)
 create mode 100644 server/inputs_channel.c
 create mode 100644 server/inputs_channel.h

-- 
1.7.3.2



More information about the Spice-devel mailing list