aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/inet_sctp.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2011-09-20 15:56:59 +0000
committerRaimo Niskanen <[email protected]>2011-11-17 15:42:13 +0100
commit2831667add272eab3915bcecd9b8f3c89aad78f3 (patch)
tree8ca00d9d8bb17c49d707e04a3b82967c572279e5 /lib/kernel/src/inet_sctp.erl
parentfe19021972e12c7fb063f56209a4a305a134dfb6 (diff)
downloadotp-2831667add272eab3915bcecd9b8f3c89aad78f3.tar.gz
otp-2831667add272eab3915bcecd9b8f3c89aad78f3.tar.bz2
otp-2831667add272eab3915bcecd9b8f3c89aad78f3.zip
kernel: Bugfix - SCTP connect with sndrcvinfo in assoc_change event
On some platforms (FreeBSD) the #sctp_assoc_change{state=comm_up} event arriving during gen_sctp:connect/4,5 contains ancillary data #sctp_sndrcvinfo{}. That was not expected by the code.
Diffstat (limited to 'lib/kernel/src/inet_sctp.erl')
-rw-r--r--lib/kernel/src/inet_sctp.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kernel/src/inet_sctp.erl b/lib/kernel/src/inet_sctp.erl
index 8482dd1b12..2d799d79fa 100644
--- a/lib/kernel/src/inet_sctp.erl
+++ b/lib/kernel/src/inet_sctp.erl
@@ -111,7 +111,7 @@ connect(S, Addr, Port, Opts, Timer) ->
connect_get_assoc(S, Addr, Port, false, Timer) ->
case recv(S, inet:timeout(Timer)) of
- {ok, {Addr, Port, [], #sctp_assoc_change{state=St}=Ev}} ->
+ {ok, {Addr, Port, _, #sctp_assoc_change{state=St}=Ev}} ->
if St =:= comm_up ->
%% Yes, successfully connected, return the whole
%% sctp_assoc_change event (containing, in particular,
@@ -132,7 +132,7 @@ connect_get_assoc(S, Addr, Port, false, Timer) ->
connect_get_assoc(S, Addr, Port, Active, Timer) ->
Timeout = inet:timeout(Timer),
receive
- {sctp,S,Addr,Port,{[],#sctp_assoc_change{state=St}=Ev}} ->
+ {sctp,S,Addr,Port,{_,#sctp_assoc_change{state=St}=Ev}} ->
case Active of
once ->
prim_inet:setopt(S, active, once);