diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2016-04-07 17:11:22 -0500 |
---|---|---|
committer | Jonathon Jongsma <jjongsma@redhat.com> | 2016-04-15 11:14:36 -0500 |
commit | 021d960471559cb1f65cd676c16da6f71bef3352 (patch) | |
tree | e3b66858145dafc17258e1ada6fccd68a5ffacab /server/spicevmc.c | |
parent | 521dd24ffbbfd9ae2864ad3f8dd21126fc60f899 (diff) |
char-device: Replace RedCharDeviceMsgToClient with PipeItem
Now that all derived classes use a type deriving from PipeItem for their
RedCharDeviceMsgToClient, we can make this explicit in the
RedCharDeviceClass vfuncs, and remove the RedCharDeviceMsgToClient
typedef.
Diffstat (limited to 'server/spicevmc.c')
-rw-r--r-- | server/spicevmc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/server/spicevmc.c b/server/spicevmc.c index 246886c1..3ab067f1 100644 --- a/server/spicevmc.c +++ b/server/spicevmc.c @@ -105,20 +105,20 @@ enum { PIPE_ITEM_TYPE_PORT_EVENT, }; -static RedCharDeviceMsgToClient *spicevmc_chardev_ref_msg_to_client(RedCharDeviceMsgToClient *msg, - void *opaque) +static PipeItem *spicevmc_chardev_ref_msg_to_client(PipeItem *msg, + void *opaque) { return pipe_item_ref(msg); } -static void spicevmc_chardev_unref_msg_to_client(RedCharDeviceMsgToClient *msg, +static void spicevmc_chardev_unref_msg_to_client(PipeItem *msg, void *opaque) { pipe_item_unref(msg); } -static RedCharDeviceMsgToClient *spicevmc_chardev_read_msg_from_dev(SpiceCharDeviceInstance *sin, - void *opaque) +static PipeItem *spicevmc_chardev_read_msg_from_dev(SpiceCharDeviceInstance *sin, + void *opaque) { SpiceVmcState *state = opaque; SpiceCharDeviceInterface *sif; @@ -145,19 +145,19 @@ static RedCharDeviceMsgToClient *spicevmc_chardev_read_msg_from_dev(SpiceCharDev if (n > 0) { spice_debug("read from dev %d", n); msg_item->buf_used = n; - return msg_item; + return (PipeItem *)msg_item; } else { state->pipe_item = msg_item; return NULL; } } -static void spicevmc_chardev_send_msg_to_client(RedCharDeviceMsgToClient *msg, +static void spicevmc_chardev_send_msg_to_client(PipeItem *msg, RedClient *client, void *opaque) { SpiceVmcState *state = opaque; - SpiceVmcPipeItem *vmc_msg = msg; + SpiceVmcPipeItem *vmc_msg = (SpiceVmcPipeItem *)msg; spice_assert(state->rcc->client == client); pipe_item_ref(vmc_msg); |