[Spice-devel] [vdagent-win PATCH v5 2/6] Use proper invalid value for _vio_serial

Christophe Fergeau cfergeau at redhat.com
Wed Jul 18 09:26:34 UTC 2018


I would squash this in the next commit, but

Acked-by: Christophe Fergeau <cfergeau at redhat.com>
if you prefer  to keep them separate.

Christophe

On Mon, Jul 09, 2018 at 09:51:40AM +0100, Frediano Ziglio wrote:
> For some reason kernel handles in Windows have 2 invalid values
> depending on the type. Files/devices use INVALID_HANDLE_VALUE (-1),
> while others use NULL (0). As _vio_serial is a file, created
> with CreateFile, use INVALID_HANDLE_VALUE for consistency.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  vdagent/vdagent.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp
> index dbf6556..010e73b 100644
> --- a/vdagent/vdagent.cpp
> +++ b/vdagent/vdagent.cpp
> @@ -196,7 +196,7 @@ VDAgent::VDAgent()
>      , _session_is_locked (false)
>      , _desktop_switch (false)
>      , _display_setting (VD_AGENT_REGISTRY_KEY)
> -    , _vio_serial (NULL)
> +    , _vio_serial (INVALID_HANDLE_VALUE)
>      , _read_pos (0)
>      , _write_pos (0)
>      , _logon_desktop (false)
> -- 
> 2.17.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180718/374fc48e/attachment.sig>


More information about the Spice-devel mailing list