mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
Remove release_item callback
Just a call to red_pipe_item_unref. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
7b49fc836b
commit
fef7bec4a9
@ -583,16 +583,7 @@ static void red_channel_client_send_item(RedChannelClient *rcc, RedPipeItem *ite
|
||||
|
||||
static void red_channel_client_release_item(RedChannelClient *rcc, RedPipeItem *item, int item_pushed)
|
||||
{
|
||||
switch (item->type) {
|
||||
case RED_PIPE_ITEM_TYPE_SET_ACK:
|
||||
case RED_PIPE_ITEM_TYPE_EMPTY_MSG:
|
||||
case RED_PIPE_ITEM_TYPE_MIGRATE:
|
||||
case RED_PIPE_ITEM_TYPE_PING:
|
||||
free(item);
|
||||
break;
|
||||
default:
|
||||
rcc->channel->channel_cbs.release_item(rcc, item, item_pushed);
|
||||
}
|
||||
red_pipe_item_unref(item);
|
||||
}
|
||||
|
||||
static inline void red_channel_client_release_sent_item(RedChannelClient *rcc)
|
||||
@ -1016,11 +1007,6 @@ void red_channel_client_default_migrate(RedChannelClient *rcc)
|
||||
red_channel_client_pipe_add_type(rcc, RED_PIPE_ITEM_TYPE_MIGRATE);
|
||||
}
|
||||
|
||||
static void red_channel_release_item(RedChannelClient *rcc, RedPipeItem *item, int item_pushed)
|
||||
{
|
||||
red_pipe_item_unref(item);
|
||||
}
|
||||
|
||||
RedChannel *red_channel_create(int size,
|
||||
RedsState *reds,
|
||||
const SpiceCoreInterfaceInternal *core,
|
||||
@ -1045,9 +1031,6 @@ RedChannel *red_channel_create(int size,
|
||||
channel->handle_acks = handle_acks;
|
||||
channel->migration_flags = migration_flags;
|
||||
memcpy(&channel->channel_cbs, channel_cbs, sizeof(ChannelCbs));
|
||||
if (!channel->channel_cbs.release_item) {
|
||||
channel->channel_cbs.release_item = red_channel_release_item;
|
||||
}
|
||||
|
||||
channel->reds = reds;
|
||||
channel->core = core;
|
||||
|
||||
@ -159,8 +159,6 @@ typedef void (*channel_disconnect_proc)(RedChannelClient *rcc);
|
||||
typedef int (*channel_configure_socket_proc)(RedChannelClient *rcc);
|
||||
typedef void (*channel_send_pipe_item_proc)(RedChannelClient *rcc, RedPipeItem *item);
|
||||
typedef void (*channel_hold_pipe_item_proc)(RedChannelClient *rcc, RedPipeItem *item);
|
||||
typedef void (*channel_release_pipe_item_proc)(RedChannelClient *rcc,
|
||||
RedPipeItem *item, int item_pushed);
|
||||
typedef void (*channel_on_incoming_error_proc)(RedChannelClient *rcc);
|
||||
typedef void (*channel_on_outgoing_error_proc)(RedChannelClient *rcc);
|
||||
|
||||
@ -188,7 +186,6 @@ typedef struct {
|
||||
channel_disconnect_proc on_disconnect;
|
||||
channel_send_pipe_item_proc send_item;
|
||||
channel_hold_pipe_item_proc hold_item;
|
||||
channel_release_pipe_item_proc release_item;
|
||||
channel_alloc_msg_recv_buf_proc alloc_recv_buf;
|
||||
channel_release_msg_recv_buf_proc release_recv_buf;
|
||||
channel_handle_migrate_flush_mark_proc handle_migrate_flush_mark;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user