aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2011-09-19 15:30:23 +0200
committerAnders Svensson <[email protected]>2011-09-19 15:30:23 +0200
commit532c72b3ffeb9219bdb7e6a7f5d21fe26f0f0629 (patch)
tree0c3fe4e4e9bd77edf34dc235b679cf1d8cf195fb
parent70fa7fabed2fb4f47155f02a1c8fa4054a546739 (diff)
parente84f232326b2800ca806c867b2bfbe3652d423cb (diff)
downloadotp-532c72b3ffeb9219bdb7e6a7f5d21fe26f0f0629.tar.gz
otp-532c72b3ffeb9219bdb7e6a7f5d21fe26f0f0629.tar.bz2
otp-532c72b3ffeb9219bdb7e6a7f5d21fe26f0f0629.zip
Merge branch 'dev' into major
-rw-r--r--lib/diameter/src/transport/diameter_sctp.erl19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/diameter/src/transport/diameter_sctp.erl b/lib/diameter/src/transport/diameter_sctp.erl
index 92aa8488a0..46473e7bf1 100644
--- a/lib/diameter/src/transport/diameter_sctp.erl
+++ b/lib/diameter/src/transport/diameter_sctp.erl
@@ -525,7 +525,22 @@ recv({[#sctp_sndrcvinfo{stream = Id}], Bin}, #transport{parent = Pid})
recv({[], #sctp_shutdown_event{assoc_id = Id}},
#transport{assoc_id = Id}) ->
- stop.
+ stop;
+
+%% Note that diameter_sctp(3) documents that sctp_events cannot be
+%% specified in the list of options passed to gen_sctp and that
+%% gen_opts/1 guards against this. This is to ensure that we know what
+%% events to expect and also to ensure that we receive
+%% #sctp_sndrcvinfo{} with each incoming message (data_io_event =
+%% true). Adaptation layer events (ie. #sctp_adaptation_event{}) are
+%% disabled by default so don't handle it. We could simply disable
+%% events we don't react to but don't.
+
+recv({[], #sctp_paddr_change{}}, _) ->
+ ok;
+
+recv({[], #sctp_pdapi_event{}}, _) ->
+ ok.
%% up/1
@@ -591,7 +606,7 @@ f([], _, _) ->
%% assoc_id/1
-assoc_id(#sctp_shutdown_event{assoc_id = Id}) -> %% undocumented
+assoc_id(#sctp_shutdown_event{assoc_id = Id}) ->
Id;
assoc_id(#sctp_assoc_change{assoc_id = Id}) ->
Id;