From 7dfd7a0c779da2df2c90ea59a9defb313779aaca Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Thu, 4 Nov 2010 17:20:24 +0200 Subject: server/red_channel: add hold_item (from red_worker) hold_item called on init_send_data, matching release. This is not the behavior of red_worker - we ref++ (==hold_item) when sending the item, and --refs when releasing it, instead of only holding if the send is blocked. Note 1: Naming: hold_pipe_item is the proc name, the variable is called hold_item, this is similar to release_item/release_pipe_item naming. Note 2: All channels have empty implementation, we later use this when red_worker get's RedChannelized. --- server/smartcard.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/smartcard.c') diff --git a/server/smartcard.c b/server/smartcard.c index 7c0a5aaf..93142cce 100644 --- a/server/smartcard.c +++ b/server/smartcard.c @@ -485,6 +485,10 @@ static int smartcard_channel_handle_message(RedChannel *channel, SpiceDataHeader return TRUE; } +static void smartcard_channel_hold_pipe_item(PipeItem *item) +{ +} + static void smartcard_link(Channel *channel, RedsStreamContext *peer, int migration, int num_common_caps, uint32_t *common_caps, int num_caps, @@ -502,6 +506,7 @@ static void smartcard_link(Channel *channel, RedsStreamContext *peer, smartcard_channel_handle_message, smartcard_channel_alloc_msg_rcv_buf, smartcard_channel_release_msg_rcv_buf, + smartcard_channel_hold_pipe_item, smartcard_channel_send_item, smartcard_channel_release_pipe_item); if (!g_smartcard_channel) { -- cgit