Home
last modified time | relevance | path

Searched hist:bf5de8c5d66552721fefe08de849c115ca366b56 (Results 1 – 2 of 2) sorted by relevance

/openbmc/qemu/monitor/
H A Dqmp-cmds.cdiff bf5de8c5d66552721fefe08de849c115ca366b56 Mon Mar 06 06:27:45 CST 2023 Marc-André Lureau <marcandre.lureau@redhat.com> qmp: 'add_client' actually expects sockets

Whether it is SPICE, VNC, D-Bus, or the socket chardev, they all
actually expect a socket kind or will fail in different ways at runtime.

Throw an error early if the given 'add_client' fd is not a socket, and
close it to avoid leaks.

This allows to replace the close() call with a more correct & portable
closesocket() version.

(this will allow importing sockets on Windows with a specialized command
in the following patch, while keeping the remaining monitor associated
sockets/add_client code & usage untouched)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230306122751.2355515-6-marcandre.lureau@redhat.com>
/openbmc/qemu/qapi/
H A Dmisc.jsondiff bf5de8c5d66552721fefe08de849c115ca366b56 Mon Mar 06 06:27:45 CST 2023 Marc-André Lureau <marcandre.lureau@redhat.com> qmp: 'add_client' actually expects sockets

Whether it is SPICE, VNC, D-Bus, or the socket chardev, they all
actually expect a socket kind or will fail in different ways at runtime.

Throw an error early if the given 'add_client' fd is not a socket, and
close it to avoid leaks.

This allows to replace the close() call with a more correct & portable
closesocket() version.

(this will allow importing sockets on Windows with a specialized command
in the following patch, while keeping the remaining monitor associated
sockets/add_client code & usage untouched)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230306122751.2355515-6-marcandre.lureau@redhat.com>