summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2017-09-12 18:02:51 +0100
committerFrediano Ziglio <freddy77@gmail.com>2024-06-12 21:35:08 +0100
commita986b9d4c8e044c9fb8c8907d600fedcc25e3913 (patch)
treea350b09421ef47d4896c290f0bd78604f236095e
parentf0eb8cc57dc10cbe3fa970b5b3f16bea378d9637 (diff)
XXX remove RedChannelClient::pipe_add_pushjj
-rw-r--r--server/inputs-channel.cpp2
-rw-r--r--server/main-channel-client.cpp14
-rw-r--r--server/red-channel-client.cpp6
-rw-r--r--server/red-channel-client.h1
-rw-r--r--server/smartcard-channel-client.cpp2
-rw-r--r--server/smartcard.cpp2
-rw-r--r--server/sound.cpp3
-rw-r--r--server/spicevmc.cpp6
8 files changed, 15 insertions, 21 deletions
diff --git a/server/inputs-channel.cpp b/server/inputs-channel.cpp
index 029dad4a..ef4f2ec6 100644
--- a/server/inputs-channel.cpp
+++ b/server/inputs-channel.cpp
@@ -436,7 +436,7 @@ RedInputsInitPipeItem::RedInputsInitPipeItem(uint8_t init_modifiers):
void InputsChannelClient::pipe_add_init()
{
auto modifiers = kbd_get_leds(get_channel()->keyboard);
- pipe_add_push(red::make_shared<RedInputsInitPipeItem>(modifiers));
+ pipe_add(red::make_shared<RedInputsInitPipeItem>(modifiers));
}
void InputsChannel::on_connect(RedClient *client, RedStream *stream, int migration,
diff --git a/server/main-channel-client.cpp b/server/main-channel-client.cpp
index 01600064..2f1eb3a0 100644
--- a/server/main-channel-client.cpp
+++ b/server/main-channel-client.cpp
@@ -181,7 +181,7 @@ static RedPipeItemPtr red_ping_item_new(int size)
static void main_channel_client_push_ping(MainChannelClient *mcc, int size)
{
auto item = red_ping_item_new(size);
- mcc->pipe_add_push(std::move(item));
+ mcc->pipe_add(std::move(item));
}
static RedPipeItemPtr main_agent_tokens_item_new(uint32_t num_tokens)
@@ -197,12 +197,12 @@ void MainChannelClient::push_agent_tokens(uint32_t num_tokens)
{
auto item = main_agent_tokens_item_new(num_tokens);
- pipe_add_push(std::move(item));
+ pipe_add(std::move(item));
}
void MainChannelClient::push_agent_data(red::shared_ptr<RedAgentDataPipeItem>&& item)
{
- pipe_add_push(item);
+ pipe_add(item);
}
static RedPipeItemPtr
@@ -232,7 +232,7 @@ void MainChannelClient::push_init(int display_channels_hint,
auto item = main_init_item_new(priv->connection_id, display_channels_hint,
current_mouse_mode, is_client_mouse_allowed,
multi_media_time, ram_hint);
- pipe_add_push(std::move(item));
+ pipe_add(std::move(item));
}
static RedPipeItemPtr main_name_item_new(const char *name)
@@ -250,7 +250,7 @@ void MainChannelClient::push_name(const char *name)
return;
auto item = main_name_item_new(name);
- pipe_add_push(std::move(item));
+ pipe_add(std::move(item));
}
static RedPipeItemPtr main_uuid_item_new(const uint8_t uuid[16])
@@ -268,13 +268,13 @@ void MainChannelClient::push_uuid(const uint8_t uuid[16])
return;
auto item = main_uuid_item_new(uuid);
- pipe_add_push(std::move(item));
+ pipe_add(std::move(item));
}
void MainChannelClient::push_notify(const char *msg)
{
auto item = main_notify_item_new(msg, 1);
- pipe_add_push(std::move(item));
+ pipe_add(std::move(item));
}
RedPipeItemPtr
diff --git a/server/red-channel-client.cpp b/server/red-channel-client.cpp
index b7567ffb..6c62fed0 100644
--- a/server/red-channel-client.cpp
+++ b/server/red-channel-client.cpp
@@ -1392,12 +1392,6 @@ void RedChannelClient::pipe_add(RedPipeItemPtr&& item)
priv->pipe.push_front(std::move(item));
}
-void RedChannelClient::pipe_add_push(RedPipeItemPtr&& item)
-{
- pipe_add(std::move(item));
- push();
-}
-
void RedChannelClient::pipe_add_after_pos(RedPipeItemPtr&& item,
Pipe::iterator pipe_item_pos)
{
diff --git a/server/red-channel-client.h b/server/red-channel-client.h
index 5c4df962..79207eb2 100644
--- a/server/red-channel-client.h
+++ b/server/red-channel-client.h
@@ -85,7 +85,6 @@ protected:
public:
typedef std::list<RedPipeItemPtr, red::Mallocator<RedPipeItemPtr>> Pipe;
- void pipe_add_push(RedPipeItemPtr&& item);
void pipe_add(RedPipeItemPtr&& item);
void pipe_add_after(RedPipeItemPtr&& item, RedPipeItem *pos);
void pipe_add_after_pos(RedPipeItemPtr&& item,
diff --git a/server/smartcard-channel-client.cpp b/server/smartcard-channel-client.cpp
index 65c402f3..033d77b0 100644
--- a/server/smartcard-channel-client.cpp
+++ b/server/smartcard-channel-client.cpp
@@ -143,7 +143,7 @@ static void smartcard_channel_client_push_error(RedChannelClient *rcc,
error_item->vheader.type = VSC_Error;
error_item->vheader.length = sizeof(error_item->error);
error_item->error.code = error;
- rcc->pipe_add_push(error_item);
+ rcc->pipe_add(error_item);
}
static void smartcard_channel_client_add_reader(SmartCardChannelClient *scc)
diff --git a/server/smartcard.cpp b/server/smartcard.cpp
index 023cf523..50ff465d 100644
--- a/server/smartcard.cpp
+++ b/server/smartcard.cpp
@@ -137,7 +137,7 @@ RedCharDeviceSmartcard::read_one_msg_from_device()
dev->priv->buf_pos = dev->priv->buf + remaining;
dev->priv->buf_used = remaining;
if (msg_to_client && dev->priv->scc) {
- dev->priv->scc->pipe_add_push(std::move(msg_to_client));
+ dev->priv->scc->pipe_add(std::move(msg_to_client));
}
}
return RedPipeItemPtr();
diff --git a/server/sound.cpp b/server/sound.cpp
index acc80008..2e31e2d3 100644
--- a/server/sound.cpp
+++ b/server/sound.cpp
@@ -615,7 +615,8 @@ static void snd_send(SndChannelClient * client)
}
// just append a dummy item and push!
RedPipeItemPtr item(&client->persistent_pipe_item);
- client->pipe_add_push(std::move(item));
+ client->pipe_add(std::move(item));
+ client->push();
}
XXX_CAST(RedChannelClient, PlaybackChannelClient, PLAYBACK_CHANNEL_CLIENT)
diff --git a/server/spicevmc.cpp b/server/spicevmc.cpp
index 3dbc3eaf..711f2482 100644
--- a/server/spicevmc.cpp
+++ b/server/spicevmc.cpp
@@ -270,7 +270,7 @@ static void spicevmc_port_send_init(VmcChannelClient *rcc)
SpiceCharDeviceInstance *sin = channel->chardev_sin;
auto item = red::make_shared<RedPortInitPipeItem>(sin->portname, channel->port_opened);
- rcc->pipe_add_push(item);
+ rcc->pipe_add(item);
}
static void spicevmc_port_send_event(RedChannelClient *rcc, uint8_t event)
@@ -278,7 +278,7 @@ static void spicevmc_port_send_event(RedChannelClient *rcc, uint8_t event)
auto item = red::make_shared<RedPortEventPipeItem>();
item->event = event;
- rcc->pipe_add_push(item);
+ rcc->pipe_add(item);
}
void RedCharDeviceSpiceVmc::remove_client(RedCharDeviceClientOpaque *opaque)
@@ -474,7 +474,7 @@ static void
spicevmc_red_channel_queue_data(RedVmcChannel *channel, red::shared_ptr<RedVmcPipeItem>&& item)
{
channel->queued_data += item->buf_used;
- channel->rcc->pipe_add_push(item);
+ channel->rcc->pipe_add(item);
}
static void spicevmc_red_channel_send_data(VmcChannelClient *rcc,