diff --git a/server/red_channel.c b/server/red_channel.c index b367f0f7..ebb181c5 100644 --- a/server/red_channel.c +++ b/server/red_channel.c @@ -520,6 +520,16 @@ void red_channel_pipe_add_push(RedChannel *channel, PipeItem *item) red_channel_push(channel); } +void red_channel_pipe_add_after(RedChannel *channel, PipeItem *item, PipeItem *pos) +{ + ASSERT(channel); + ASSERT(pos); + ASSERT(item); + + channel->pipe_size++; + ring_add_after(&item->link, &pos->link); +} + int red_channel_pipe_item_is_linked(RedChannel *channel, PipeItem *item) { return ring_item_is_linked(&item->link); diff --git a/server/red_channel.h b/server/red_channel.h index 0a113fc5..7c973fd4 100644 --- a/server/red_channel.h +++ b/server/red_channel.h @@ -216,6 +216,7 @@ void red_channel_begin_send_message(RedChannel *channel); void red_channel_pipe_item_init(RedChannel *channel, PipeItem *item, int type); void red_channel_pipe_add_push(RedChannel *channel, PipeItem *item); void red_channel_pipe_add(RedChannel *channel, PipeItem *item); +void red_channel_pipe_add_after(RedChannel *channel, PipeItem *item, PipeItem *pos); int red_channel_pipe_item_is_linked(RedChannel *channel, PipeItem *item); void red_channel_pipe_item_remove(RedChannel *channel, PipeItem *item); void red_channel_pipe_add_tail(RedChannel *channel, PipeItem *item);