diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2011-08-03 15:43:02 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-08-23 18:23:46 +0300 |
commit | 812d01c06090f14ccb65e9a3b81df311c51e4b26 (patch) | |
tree | 673f86f7619dca9f611ac038e45e488ba7f97ee8 /server/inputs_channel.c | |
parent | 67671b26097a0d629a42356b22690c8b34db51a5 (diff) |
server/red_channel.c: pack all channel callbacks to ChannelCbs
Diffstat (limited to 'server/inputs_channel.c')
-rw-r--r-- | server/inputs_channel.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/server/inputs_channel.c b/server/inputs_channel.c index b8d7801..e6af0d5 100644 --- a/server/inputs_channel.c +++ b/server/inputs_channel.c @@ -510,23 +510,26 @@ static void inputs_link(Channel *channel, RedClient *client, ASSERT(channel->data == g_inputs_channel); if (channel->data == NULL) { + ChannelCbs channel_cbs; + + memset(&channel_cbs, sizeof(channel_cbs), 0); + + channel_cbs.config_socket = inputs_channel_config_socket; + channel_cbs.disconnect = inputs_channel_disconnect; + channel_cbs.send_item = inputs_channel_send_item; + channel_cbs.hold_item = inputs_channel_hold_pipe_item; + channel_cbs.release_item = inputs_channel_release_pipe_item; + channel_cbs.alloc_recv_buf = inputs_channel_alloc_msg_rcv_buf; + channel_cbs.release_recv_buf = inputs_channel_release_msg_rcv_buf; + red_printf("inputs channel create"); channel->data = g_inputs_channel = (InputsChannel*)red_channel_create_parser( sizeof(InputsChannel), core, migration, FALSE /* handle_acks */ - ,inputs_channel_config_socket - ,inputs_channel_disconnect ,spice_get_client_channel_parser(SPICE_CHANNEL_INPUTS, NULL) ,inputs_channel_handle_parsed - ,inputs_channel_alloc_msg_rcv_buf - ,inputs_channel_release_msg_rcv_buf - ,inputs_channel_hold_pipe_item - ,inputs_channel_send_item - ,inputs_channel_release_pipe_item ,inputs_channel_on_error ,inputs_channel_on_error - ,NULL - ,NULL - ,NULL); + ,&channel_cbs); ASSERT(channel->data); } red_printf("inputs channel client create"); |