diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2019-02-08 15:52:54 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2019-02-08 17:50:35 +0100 |
commit | c31c264dc693023042c46b4d80041969223ffc75 (patch) | |
tree | 473c061e419fdb53e0c9c670ea445901dc99d4a4 | |
parent | da4462319c6b52566b5093ca62958f6fa67bec33 (diff) |
Use RedChannelClient instead of RedClient in CharDevice::send_tokens_to_client
-rw-r--r-- | server/char-device.c | 6 | ||||
-rw-r--r-- | server/char-device.h | 2 | ||||
-rw-r--r-- | server/reds.c | 5 |
3 files changed, 6 insertions, 7 deletions
diff --git a/server/char-device.c b/server/char-device.c index 6b1ae280..b797d626 100644 --- a/server/char-device.c +++ b/server/char-device.c @@ -117,7 +117,7 @@ red_char_device_send_msg_to_client(RedCharDevice *dev, static void red_char_device_send_tokens_to_client(RedCharDevice *dev, - RedClient *client, + RedChannelClient *rcc, uint32_t tokens) { RedCharDeviceClass *klass = RED_CHAR_DEVICE_GET_CLASS(dev); @@ -126,7 +126,7 @@ red_char_device_send_tokens_to_client(RedCharDevice *dev, g_warn_if_reached(); return; } - klass->send_tokens_to_client(dev, client, tokens); + klass->send_tokens_to_client(dev, rcc, tokens); } static void @@ -451,7 +451,7 @@ static void red_char_device_client_tokens_add(RedCharDevice *dev, dev_client->num_client_tokens += dev_client->num_client_tokens_free; dev_client->num_client_tokens_free = 0; - red_char_device_send_tokens_to_client(dev, dev_client->client, tokens); + red_char_device_send_tokens_to_client(dev, dev_client->rcc, tokens); } } diff --git a/server/char-device.h b/server/char-device.h index 9bc7e8b2..1d977516 100644 --- a/server/char-device.h +++ b/server/char-device.h @@ -63,7 +63,7 @@ struct RedCharDeviceClass /* The cb is called when a predefined number of write buffers were consumed by the * device */ void (*send_tokens_to_client)(RedCharDevice *self, - RedClient *client, + RedChannelClient *rcc, uint32_t tokens); /* The cb is called when a server (self) message that was addressed to the device, diff --git a/server/reds.c b/server/reds.c index ca180bea..314fcc75 100644 --- a/server/reds.c +++ b/server/reds.c @@ -1006,11 +1006,10 @@ void reds_send_device_display_info(RedsState *reds) } static void vdi_port_send_tokens_to_client(RedCharDevice *self, - RedClient *client, + RedChannelClient *rcc, uint32_t tokens) { - main_channel_client_push_agent_tokens(red_client_get_main(client), - tokens); + main_channel_client_push_agent_tokens(rcc, tokens); } static void vdi_port_on_free_self_token(RedCharDevice *self) |