If the client closes the connection while having pending large messages
(split into multiple chunks) the state is not correctly reset causing
next client messages to be not correctly handled.
This can occur for instance if the client is closed (or killed) while
transferring a large file.
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1548419.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Victor Toso <victortoso@redhat.com>
The client is sending messages that are compatible with agent
capabilities but also encoded with capabilities it knows of so to
check them we need to consider final capabilities, not client ones.
This fixes a regression introduced with
"vdagent: Reuse agent_check_message" where some messages were wrongly
interpreted as wrong (particularly some clipboard messages).
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Jakub Janků <jjanku@redhat.com>
On Windows beside the various single executables like Linux there's
a single "magick" executable you can use specifying what you want
to do.
Having a single executable avoids the trick to fix "convert" problem
and is easier to port, you just have to copy the single executable.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
The EXTRA_DIST part in Makefile.am is needed as spice-protocol
removed support for Autoconf.
We don't need anymore "ignore=untracked" in the submodule as
we are not going to add or modify files anymore.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reduce CI resource usage using a single job instead of 2.
The project is pretty small and the setup of the 2 jobs is pretty
long compared to the build so using a single job (we used the same
container image for both) reduce CI resource usage.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Force sync and update of all git submodules.
Do not install packaged spice-protocol, we are using submodule.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Revert "try to remove other bugs", commit
57266085b9.
Revert "try to fix previous", commit
8e40377068.
Revert "attempt to fix more warnings!", commit
66b6933a38.
I put by mistake on the MR due to some automatic scripts.
Their state are pretty experimental.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Avoids:
warning C4267: 'initializing': conversion from 'size_t' to 'DWORD', possible loss of data
Value won't never be that huge to cause overflow (we are reading a string
in a static buffer, we don't expect an encyclopedia).
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This will help with making a release.
spice-protocol's .gitignore is generated and not committed,
so after running ./autogen.sh (autoreconf) git thinks
spice-protocol is dirty (just because of generated files).
Signed-off-by: Uri Lublin <uril@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
When building on Windows with Wix, also add Platform to Package
as follows (wixl warns about it):
Platform="$(var.Arch)"
Signed-off-by: Uri Lublin <uril@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
These project files were not correctly tested and updated for a
while.
Now that CMake is present it can be used to generate proper
updated Visual Studio projects instead.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Allows to build out-of-tree and have a clean working directory.
Autoconf used to work with out-of-tree and "config.h" in the
build directory as a "common" directory in the build directory
was created, so including "../config.h" in version.rc and having
"-I $(top_builddir)/common" used to work.
CMake does not create "common" under the build directory so the
"../config.h" inclusion fails.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
We want to have self-contained executables so link to the static
version of Microsoft CRT, not the DLL ones.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Although for other projects we started moving to Meson instead of
Autoconf add support for CMake for Windows agent.
Windows has more support for CMake than for Meson, there are
many tools (like Visual Studio, NuGet and vcpkg) and libraries
(like libz and libpng that we use here) that support CMake instead
of Meson.
This will also make easier to add automatic builds using Microsoft
tools.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
When building with older mingw, sprintf_s does not
always work as expected, but snprintf does.
Also it's more consistent in the file.
Note that when building with VS, snprintf becomes sprintf_s
Related: rhbz#1410181
Signed-off-by: Uri Lublin <uril@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
GetVersionEx was deprecated by Microsoft in favour of utilities
in versionhelpers.h.
The new function returns the same results as:
- GetVersionEx returns maximum 6.2 version and also 6.0 version
is Vista, not Windows 7 so SYS_VER_WIN_7_CLASS was returned
for all system from Windows Vista;
- We don't support version earlier than Windows XP and no Windows
versions had version >= 5.2 and < 6.0 so SYS_VER_WIN_XP_CLASS
was returned from Windows XP;
- we don't support any system before Windows XP.
Tested under Windows XP, 7 and 10.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This has different advantages:
- code is shorter and more readable;
- does not need to open the file and close;
- works on files bigger than 4gb.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Have the same behaviour of Linux machines.
The directory is not opened again and again, only is not already
opened.
This is done checking the directory opened in explorer.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Some declarations are available in MingW only defining a more recent
version of WINVER. Set WINVER to 0x0601 (Windows 7) to enable these
definitions.
This allows to clean some files.
The definition were already available in Fedora 22.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Currently the MSI built for x86 system can be easily installed
on x64 system. When the script is processed by WIX this can be
prevented by passing '-dNoWOW=yes' to the WIX-candle.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Customize these properties of WIX script during build under
WIXL or Windows.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Allows the same WIXL script to be used for WIX on Windows.
WIX raises error if Win64 property is not set for x64 MSI.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
_ftime_s, vdagent_strcat_s and vdagent_strcpy_s are not used.
Code is using different string functions.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>