agent: fix vdagent monitor flag filtering

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Marc-André Lureau 2020-09-17 01:39:23 +04:00 committed by Frediano Ziglio
parent 0d7d0d35d8
commit fa0c199d33

View File

@ -250,8 +250,8 @@ agent_message_monitors_config_from_le(const VDAgentMessage *message_header, uint
{
uint32_from_le(message, sizeof(VDAgentMonitorsConfig), 0);
VDAgentMonitorsConfig *vdata = (VDAgentMonitorsConfig*) message;
vdata->flags &= ~(VD_AGENT_CONFIG_MONITORS_FLAG_USE_POS|
VD_AGENT_CONFIG_MONITORS_FLAG_PHYSICAL_SIZE);
vdata->flags &= VD_AGENT_CONFIG_MONITORS_FLAG_USE_POS|
VD_AGENT_CONFIG_MONITORS_FLAG_PHYSICAL_SIZE;
size_t element_size = sizeof(vdata->monitors[0]);
if ((vdata->flags & VD_AGENT_CONFIG_MONITORS_FLAG_PHYSICAL_SIZE) != 0) {
element_size += sizeof(VDAgentMonitorMM);