This changes the header guards in all .h files to follow this format:
/*
* Licensing block
*/
/* ... */
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Explicitely discard AGENT_MSG_FILTER_MONITORS_CONFIG messages
from the agent.
Also remove unused AGENT_MSG_FILTER_END
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Make sure is possible to include any headers alone.
I used this script to check independence (run under server directory):
----
#!/bin/bash
set -e
# check not already modified
if grep -q libheaders.la Makefile.am; then
echo "Header library already prepared" >&2
exit 1
fi
add_lib() {
local hdr="$1"
hdr=${hdr%.h}
c="mao_${hdr}.c"
echo "#include \"${hdr}.h\"" > $c
echo -e "\t$c \\" >&3
}
# add library to compile all headers alones
exec 3>> Makefile.am
echo "
noinst_LTLIBRARIES += libheaders.la
libheaders_la_SOURCES = \\" >&3
for hdr in *.h; do
case $hdr in
spice-bitmap-utils.h)
add_lib $hdr
;;
spice*.h)
;;
*)
add_lib $hdr
;;
esac
done
echo -e "\t\$(NULL)" >&3
exec 3>&-
----
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
AgentMsgFilter needs to know whether monitors config messages need to be
filtered or not. This used to be done from within
agent_msg_filter_config() using the global RedsState, but this got more
tricky as it was removed.
A first attempt a1e62fa5ae caused crashes on qemu startup with
"qemu-system-x86_64 -spice port=5900" (without -vga qxl). A second
attempt added a RedsState* argument to agent_msg_filter_config() which
in my opinion is not really nice from a layering point of view.
This new attempt makes sure AgentMsgFilter state is correct when the
filter is set to stop discarding all data, which allows to remove direct
use of RedsState from within AgentMsgFilter.
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Passing Reds into agent-msg-filter.[ch] isn't the right thing to do from
a layering point of view.
This reverts commit a1e62fa5ae.
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Patch 1f21008060 ("Remove use of global
'reds' from AgentMsgFilter") introduced a regression. This because
QXLInterface->client_monitors_config was called before returning
from spice_add_interface. Some client of spice-server expect the
spice_add_interface already returned and some state change was done
before client_monitors_config was called.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
If the guest supports client monitors config we pass it the
VDAgentMonitorsConfig message via the
QXLInterface::client_monitors_config api instead of via the vdagent.