diff options
author | Micael Karlberg <[email protected]> | 2019-05-13 13:07:55 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-05-29 13:47:40 +0200 |
commit | 80e72ee3ddf73119618277c05df724b01ffdf18a (patch) | |
tree | e248bafc90302cb45ee5eee2ae3f9052846b6988 /erts/emulator/nifs/common | |
parent | 39e137878aa5d1f745cf3c343429fe9de47ed1be (diff) | |
download | otp-80e72ee3ddf73119618277c05df724b01ffdf18a.tar.gz otp-80e72ee3ddf73119618277c05df724b01ffdf18a.tar.bz2 otp-80e72ee3ddf73119618277c05df724b01ffdf18a.zip |
[esock|test] Add (stream) sendmsg and recvmsg test case for local
Add a sendmsg and recvmsg test case for a unix domain (stream) socket.
Found and fixed a bug for the return value for the address field
for family 'local' (encoded as 'inet').
OTP-15822
Diffstat (limited to 'erts/emulator/nifs/common')
-rw-r--r-- | erts/emulator/nifs/common/socket_nif.c | 2 | ||||
-rw-r--r-- | erts/emulator/nifs/common/socket_util.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/nifs/common/socket_nif.c b/erts/emulator/nifs/common/socket_nif.c index 7484694cdb..d8203f3b91 100644 --- a/erts/emulator/nifs/common/socket_nif.c +++ b/erts/emulator/nifs/common/socket_nif.c @@ -15180,7 +15180,7 @@ char* encode_msghdr(ErlNifEnv* env, "\r\n read: %d" "\r\n", read) ); - /* The address is not used if we are connected, + /* The address is not used if we are connected (unless family is 'local'), * so check (length = 0) before we try to encodel */ if (msgHdrP->msg_namelen != 0) { diff --git a/erts/emulator/nifs/common/socket_util.c b/erts/emulator/nifs/common/socket_util.c index a61cfc75ef..4ba48afcfa 100644 --- a/erts/emulator/nifs/common/socket_util.c +++ b/erts/emulator/nifs/common/socket_util.c @@ -1656,7 +1656,7 @@ char* make_sockaddr_un(ErlNifEnv* env, ERL_NIF_TERM* sa) { ERL_NIF_TERM keys[] = {esock_atom_family, esock_atom_path}; - ERL_NIF_TERM vals[] = {esock_atom_inet, path}; + ERL_NIF_TERM vals[] = {esock_atom_local, path}; unsigned int numKeys = sizeof(keys) / sizeof(ERL_NIF_TERM); unsigned int numVals = sizeof(vals) / sizeof(ERL_NIF_TERM); |