aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-05-04 18:49:42 +0200
committerMicael Karlberg <[email protected]>2018-09-18 13:01:37 +0200
commitbd7cab0e678ef3d327250a7dd7bd86faa685ec06 (patch)
tree1ef0848d828eea8e3277cb269ea4293f7cc0f288 /erts
parent8e14247bc5faf5abf67901b6ae5028f2b1897c65 (diff)
downloadotp-bd7cab0e678ef3d327250a7dd7bd86faa685ec06.tar.gz
otp-bd7cab0e678ef3d327250a7dd7bd86faa685ec06.tar.bz2
otp-bd7cab0e678ef3d327250a7dd7bd86faa685ec06.zip
[socket-nif] More setopt
"Handle" the linger option "fully". We still have a lot of options to handle. We also need to analyze the nif-code for setopt...
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/nifs/common/socket_nif.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/erts/emulator/nifs/common/socket_nif.c b/erts/emulator/nifs/common/socket_nif.c
index 532ac5c211..b01f26e4d4 100644
--- a/erts/emulator/nifs/common/socket_nif.c
+++ b/erts/emulator/nifs/common/socket_nif.c
@@ -3121,6 +3121,18 @@ ERL_NIF_TERM nsetopt_gen(ErlNifEnv* env,
}
break;
+ case SOCKET_OPT_VALUE_LINGER:
+ {
+ optLen = sizeof(valP->u.lingerVal);
+ res = socket_setopt(descP->sock, level, opt,
+ &valP->u.lingerVal, optLen);
+ if (res != 0)
+ result = make_error2(env, res);
+ else
+ result = atom_ok;
+ }
+ break;
+
default:
result = make_error(env, atom_einval);
}