mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-29 00:41:33 +00:00
server: filter all data from client
Filter all data from client, even when there is no agent connected to keep filter state correct.
This commit is contained in:
parent
add4bedb2f
commit
1ec316e561
@ -1710,17 +1710,6 @@ static void reds_main_handle_message(void *opaque, size_t size, uint32_t type, v
|
||||
}
|
||||
--reds->agent_state.num_client_tokens;
|
||||
|
||||
if (!vdagent) {
|
||||
add_token();
|
||||
break;
|
||||
}
|
||||
|
||||
if (!reds->agent_state.client_agent_started) {
|
||||
red_printf("SPICE_MSGC_MAIN_AGENT_DATA race");
|
||||
add_token();
|
||||
break;
|
||||
}
|
||||
|
||||
res = agent_msg_filter_process_data(&reds->agent_state.write_filter,
|
||||
message, size);
|
||||
switch (res) {
|
||||
@ -1734,6 +1723,17 @@ static void reds_main_handle_message(void *opaque, size_t size, uint32_t type, v
|
||||
return;
|
||||
}
|
||||
|
||||
if (!vdagent) {
|
||||
add_token();
|
||||
break;
|
||||
}
|
||||
|
||||
if (!reds->agent_state.client_agent_started) {
|
||||
red_printf("SPICE_MSGC_MAIN_AGENT_DATA race");
|
||||
add_token();
|
||||
break;
|
||||
}
|
||||
|
||||
if (!(ring_item = ring_get_head(&reds->agent_state.external_bufs))) {
|
||||
red_printf("no agent free bufs");
|
||||
reds_disconnect();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user