diff options
author | Micael Karlberg <bmk@erlang.org> | 2023-04-17 16:33:27 +0200 |
---|---|---|
committer | Micael Karlberg <bmk@erlang.org> | 2023-04-17 16:42:17 +0200 |
commit | 0497dbb4d5782e128d01e92d83748df997802f5c (patch) | |
tree | 4aefe2f3ede5369e7179b5e825bc8b6baf27fa04 | |
parent | c3cf3741839a31f79adf1cccc776b138223c5f2c (diff) | |
download | erlang-0497dbb4d5782e128d01e92d83748df997802f5c.tar.gz |
[erts|esock] Completion status
Incorrectly used get_overlapped_result as reason tag.
Should have been completion_status.
OTP-18029
-rw-r--r-- | erts/emulator/nifs/common/prim_socket_nif.c | 1 | ||||
-rw-r--r-- | erts/emulator/nifs/common/socket_int.h | 1 | ||||
-rw-r--r-- | erts/emulator/nifs/win32/win_socket_asyncio.c | 18 |
3 files changed, 11 insertions, 9 deletions
diff --git a/erts/emulator/nifs/common/prim_socket_nif.c b/erts/emulator/nifs/common/prim_socket_nif.c index 4c21188b3f..9d6755387d 100644 --- a/erts/emulator/nifs/common/prim_socket_nif.c +++ b/erts/emulator/nifs/common/prim_socket_nif.c @@ -1955,6 +1955,7 @@ static const struct in6_addr in6addr_loopback = GLOBAL_ATOM_DECL(cmsg_cloexec); \ GLOBAL_ATOM_DECL(command); \ GLOBAL_ATOM_DECL(completion); \ + GLOBAL_ATOM_DECL(completion_status); \ GLOBAL_ATOM_DECL(confirm); \ GLOBAL_ATOM_DECL(congestion); \ GLOBAL_ATOM_DECL(connect); \ diff --git a/erts/emulator/nifs/common/socket_int.h b/erts/emulator/nifs/common/socket_int.h index 2613fe5a1e..9c3381f975 100644 --- a/erts/emulator/nifs/common/socket_int.h +++ b/erts/emulator/nifs/common/socket_int.h @@ -242,6 +242,7 @@ typedef long ssize_t; GLOBAL_ATOM_DEF(cmsg_cloexec); \ GLOBAL_ATOM_DEF(command); \ GLOBAL_ATOM_DEF(completion); \ + GLOBAL_ATOM_DEF(completion_status); \ GLOBAL_ATOM_DEF(confirm); \ GLOBAL_ATOM_DEF(congestion); \ GLOBAL_ATOM_DEF(connect); \ diff --git a/erts/emulator/nifs/win32/win_socket_asyncio.c b/erts/emulator/nifs/win32/win_socket_asyncio.c index b8fc9c6b85..c2b9d15f63 100644 --- a/erts/emulator/nifs/win32/win_socket_asyncio.c +++ b/erts/emulator/nifs/win32/win_socket_asyncio.c @@ -5811,7 +5811,7 @@ void esaio_completion_connect_failure(ErlNifEnv* env, if (descP->connectorP != NULL) { /* Figure out the reason */ ERL_NIF_TERM reason = MKT2(env, - esock_atom_get_overlapped_result, + esock_atom_completion_status, ENO2T(env, error)); /* Inform the user waiting for a reply */ @@ -6198,7 +6198,7 @@ void esaio_completion_accept_failure(ErlNifEnv* env, &req)) { reason = MKT2(env, - esock_atom_get_overlapped_result, + esock_atom_completion_status, ENO2T(env, error)); /* Inform the user waiting for a reply */ @@ -6683,7 +6683,7 @@ void esaio_completion_send_failure(ErlNifEnv* env, &req)) { reason = MKT2(env, - esock_atom_get_overlapped_result, + esock_atom_completion_status, ENO2T(env, error)); /* Inform the user waiting for a reply */ @@ -7168,7 +7168,7 @@ void esaio_completion_sendto_failure(ErlNifEnv* env, &req)) { reason = MKT2(env, - esock_atom_get_overlapped_result, + esock_atom_completion_status, ENO2T(env, error)); /* Inform the user waiting for a reply */ @@ -7471,7 +7471,7 @@ void esaio_completion_sendmsg_failure(ErlNifEnv* env, &req)) { reason = MKT2(env, - esock_atom_get_overlapped_result, + esock_atom_completion_status, ENO2T(env, error)); /* Inform the user waiting for a reply */ @@ -7757,7 +7757,7 @@ void esaio_completion_recv_failure(ErlNifEnv* env, &req)) { /* Figure out the reason */ reason = MKT2(env, - esock_atom_get_overlapped_result, + esock_atom_completion_status, ENO2T(env, error)); /* Inform the user waiting for a reply */ @@ -8451,7 +8451,7 @@ void esaio_completion_recvfrom_failure(ErlNifEnv* env, &req)) { reason = MKT2(env, - esock_atom_get_overlapped_result, + esock_atom_completion_status, ENO2T(env, error)); /* Inform the user waiting for a reply */ @@ -8994,7 +8994,7 @@ void esaio_completion_recvmsg_failure(ErlNifEnv* env, &req)) { reason = MKT2(env, - esock_atom_get_overlapped_result, + esock_atom_completion_status, ENO2T(env, error)); /* Inform the user waiting for a reply */ @@ -9339,7 +9339,7 @@ void esaio_completion_fail(ErlNifEnv* env, if (inform) esock_warning_msg("[WIN-ESAIO] Unknown (%s) operation failure: " "\r\n Descriptor: %d" - "\r\n Errno: %T" + "\r\n Error: %T" "\r\n", opStr, descP->sock, ENO2T(env, error)); |