diff options
author | Erlang/OTP <[email protected]> | 2011-09-19 12:24:31 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2011-09-19 12:24:31 +0200 |
commit | 1a7a9e3d20383953047c16ac80fa1898e58e153a (patch) | |
tree | 8f0a6bed21549b74b0a48e556fd1606b71cbefbf /erts/emulator | |
parent | 801ec3847e330b7d67b1e4ae700211380da0d6bd (diff) | |
parent | 0159f7a9598c1d88b2e184dcc442c254ef8f14c9 (diff) | |
download | otp-1a7a9e3d20383953047c16ac80fa1898e58e153a.tar.gz otp-1a7a9e3d20383953047c16ac80fa1898e58e153a.tar.bz2 otp-1a7a9e3d20383953047c16ac80fa1898e58e153a.zip |
Merge branch 'raimo/sctp-getsetopts/OTP-9544' into maint-r13
* raimo/sctp-getsetopts/OTP-9544:
erts,kernel: Bugfix - read SCTP socket options from right protocol layer
erts: Fix bug SCTP send can only be called from controlling process
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/drivers/common/inet_drv.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c index c6e23ee647..2bff5bd4f7 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 1997-2009. All Rights Reserved. + * Copyright Ericsson AB 1997-2011. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -5941,7 +5941,7 @@ static int sctp_fill_opts(inet_descriptor* desc, char* buf, int buflen, struct linger lg; unsigned int sz = sizeof(lg); - if (sock_getopt(desc->s, IPPROTO_SCTP, SO_LINGER, + if (sock_getopt(desc->s, SOL_SOCKET, SO_LINGER, &lg, &sz) < 0) continue; /* Fill in the response: */ PLACE_FOR(spec, i, @@ -5977,7 +5977,7 @@ static int sctp_fill_opts(inet_descriptor* desc, char* buf, int buflen, { case INET_OPT_RCVBUF : { - proto = IPPROTO_SCTP; + proto = SOL_SOCKET; type = SO_RCVBUF; is_int = 1; tag = am_recbuf; @@ -5985,7 +5985,7 @@ static int sctp_fill_opts(inet_descriptor* desc, char* buf, int buflen, } case INET_OPT_SNDBUF : { - proto = IPPROTO_SCTP; + proto = SOL_SOCKET; type = SO_SNDBUF; is_int = 1; tag = am_sndbuf; @@ -6425,8 +6425,7 @@ static int sctp_fill_opts(inet_descriptor* desc, char* buf, int buflen, i = LOAD_TUPLE(spec, i, 3); /* Now, convert "spec" into the returnable term: */ - /* desc->caller = 0; What does it mean? */ - driver_output_term(desc->port, spec, i); + driver_send_term(desc->port, driver_caller(desc->port), spec, i); FREE(spec); (*dest)[0] = INET_REP_SCTP; |