aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2010-09-02 11:36:37 +0200
committerRaimo Niskanen <[email protected]>2010-09-02 11:36:37 +0200
commit9ea58dff408c0c72f5a6ad0e11b521a80292b024 (patch)
treebaa9d1b156746ad1d1e0312ffb989218c54fd3d2 /erts
parent9a30a97f07a68fc5a2f1c0095bdd88818e94089a (diff)
parent8a0e1429ef2099378cdab0288224207d4d64332d (diff)
downloadotp-9ea58dff408c0c72f5a6ad0e11b521a80292b024.tar.gz
otp-9ea58dff408c0c72f5a6ad0e11b521a80292b024.tar.bz2
otp-9ea58dff408c0c72f5a6ad0e11b521a80292b024.zip
Merge branch 'rani/sctp-sndrcvinfo/OTP-8795' into dev
* rani/sctp-sndrcvinfo/OTP-8795: Fix xfer_active close expection for Solaris behaviour Keep default #sctp_sndrcvinfo{} fields on gen_sctp:send/4 Fill in sinfo_assoc_id in struct sctp_sndrcvinfo for getopt() Conflicts: lib/kernel/test/gen_sctp_SUITE.erl
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/drivers/common/inet_drv.c4
-rw-r--r--erts/preloaded/ebin/prim_inet.beambin57272 -> 57280 bytes
-rw-r--r--erts/preloaded/src/prim_inet.erl4
3 files changed, 6 insertions, 2 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index 221904c114..79e58beb40 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -6193,6 +6193,10 @@ static int sctp_fill_opts(inet_descriptor* desc, char* buf, int buflen,
struct sctp_sndrcvinfo sri;
unsigned int sz = sizeof(sri);
+ if (buflen < ASSOC_ID_LEN) RETURN_ERROR(spec, -EINVAL);
+ sri.sinfo_assoc_id = GET_ASSOC_ID(buf);
+ buf += ASSOC_ID_LEN;
+ buflen -= ASSOC_ID_LEN;
if (sock_getopt(desc->s, IPPROTO_SCTP, SCTP_DEFAULT_SEND_PARAM,
&sri, &sz) < 0) continue;
/* Fill in the response: */
diff --git a/erts/preloaded/ebin/prim_inet.beam b/erts/preloaded/ebin/prim_inet.beam
index ac336c1b2d..71f6643368 100644
--- a/erts/preloaded/ebin/prim_inet.beam
+++ b/erts/preloaded/ebin/prim_inet.beam
Binary files differ
diff --git a/erts/preloaded/src/prim_inet.erl b/erts/preloaded/src/prim_inet.erl
index 0feb591efb..91d39c6a73 100644
--- a/erts/preloaded/src/prim_inet.erl
+++ b/erts/preloaded/src/prim_inet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2010. 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
@@ -1206,7 +1206,7 @@ type_opt_1(sctp_default_send_param) ->
timetolive = [uint32,0],
tsn = [],
cumtsn = [],
- assoc_id = [sctp_assoc_id,0]}}];
+ assoc_id = [[sctp_assoc_id,0]]}}];
%% for SCTP_OPT_EVENTS
type_opt_1(sctp_events) ->
[{record,#sctp_event_subscribe{