Skip to content

Commit

Permalink
Merge pull request #2600 from RoadRunnr/fix/socket-bindtodevice
Browse files Browse the repository at this point in the history
socket-nif: Fix string argument passing for setsockopt
  • Loading branch information
bmk authored Apr 22, 2020
2 parents 5690c09 + 97d4b6c commit 3fc3fc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erts/emulator/nifs/common/prim_socket_nif.c
Original file line number Diff line number Diff line change
Expand Up @@ -12394,7 +12394,7 @@ ERL_NIF_TERM esock_setopt_str_opt(ErlNifEnv* env,

if (GET_STR(env, eVal, val, max) > 0) {
int optLen = strlen(val);
int res = socket_setopt(descP->sock, level, opt, &val, optLen);
int res = socket_setopt(descP->sock, level, opt, val, optLen);

if (res != 0)
result = esock_make_error_errno(env, sock_errno());
Expand Down

0 comments on commit 3fc3fc6

Please sign in to comment.