mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
Don't modify watch when network queue is full
Since 5c460d, we need to watch for WATCH_EVENT_WRITE as long as there are items queued waiting to be sent, this does not need to be done only when the network queue is full. When red_channel_client_set_blocked() is called, as a message is being sent, WATCH_EVENT_WRITE will already be set, so it does not need to set it again. red_channel_client_msg_sent() removes WATCH_EVENT_WRITE, but this will be done later anyway by red_channel_client_push() if needed. Since it's redundant, we can remove this. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
68a4eaedf1
commit
2eb491cb6b
@ -495,13 +495,7 @@ static int red_channel_client_prepare_out_msg(RedChannelClient *rcc,
|
||||
|
||||
static void red_channel_client_set_blocked(RedChannelClient *rcc)
|
||||
{
|
||||
SpiceCoreInterfaceInternal *core;
|
||||
|
||||
rcc->priv->send_data.blocked = TRUE;
|
||||
core = red_channel_get_core_interface(rcc->priv->channel);
|
||||
core->watch_update_mask(core, rcc->priv->stream->watch,
|
||||
SPICE_WATCH_EVENT_READ |
|
||||
SPICE_WATCH_EVENT_WRITE);
|
||||
}
|
||||
|
||||
static inline int red_channel_client_urgent_marshaller_is_active(RedChannelClient *rcc)
|
||||
@ -641,10 +635,7 @@ static void red_channel_client_msg_sent(RedChannelClient *rcc)
|
||||
|
||||
red_channel_client_clear_sent_item(rcc);
|
||||
if (red_channel_client_is_blocked(rcc)) {
|
||||
SpiceCoreInterfaceInternal *core = red_channel_get_core_interface(rcc->priv->channel);
|
||||
rcc->priv->send_data.blocked = FALSE;
|
||||
core->watch_update_mask(core, rcc->priv->stream->watch,
|
||||
SPICE_WATCH_EVENT_READ);
|
||||
}
|
||||
|
||||
if (red_channel_client_urgent_marshaller_is_active(rcc)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user