mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
util: rename qemu_*block() socket functions
The qemu_*block() functions are meant to be be used with sockets (the
win32 implementation expects SOCKET)
Over time, those functions where used with Win32 SOCKET or
file-descriptors interchangeably. But for portability, they must only be
used with socket-like file-descriptors. FDs can use
g_unix_set_fd_nonblocking() instead.
Rename the functions with "socket" in the name to prevent bad usages.
This is effectively reverting commit f9e8cacc55
("oslib-posix:
rename socket_set_nonblock() to qemu_set_nonblock()").
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
b2670d1f99
commit
ff5927baa7
14 changed files with 32 additions and 32 deletions
|
@ -88,7 +88,7 @@ static int socket_can_bind_connect(const char *hostname, int family)
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
qemu_set_nonblock(cfd);
|
||||
qemu_socket_set_nonblock(cfd);
|
||||
if (connect(cfd, (struct sockaddr *)&ss, sslen) < 0) {
|
||||
if (errno == EINPROGRESS) {
|
||||
check_soerr = true;
|
||||
|
|
|
@ -90,8 +90,8 @@ static void test_crypto_tls_session_psk(void)
|
|||
* thread, so we need these non-blocking to avoid deadlock
|
||||
* of ourselves
|
||||
*/
|
||||
qemu_set_nonblock(channel[0]);
|
||||
qemu_set_nonblock(channel[1]);
|
||||
qemu_socket_set_nonblock(channel[0]);
|
||||
qemu_socket_set_nonblock(channel[1]);
|
||||
|
||||
clientCreds = test_tls_creds_psk_create(
|
||||
QCRYPTO_TLS_CREDS_ENDPOINT_CLIENT,
|
||||
|
@ -244,8 +244,8 @@ static void test_crypto_tls_session_x509(const void *opaque)
|
|||
* thread, so we need these non-blocking to avoid deadlock
|
||||
* of ourselves
|
||||
*/
|
||||
qemu_set_nonblock(channel[0]);
|
||||
qemu_set_nonblock(channel[1]);
|
||||
qemu_socket_set_nonblock(channel[0]);
|
||||
qemu_socket_set_nonblock(channel[1]);
|
||||
|
||||
#define CLIENT_CERT_DIR "tests/test-crypto-tlssession-client/"
|
||||
#define SERVER_CERT_DIR "tests/test-crypto-tlssession-server/"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue