diff options
author | Anders Svensson <[email protected]> | 2015-02-23 23:19:13 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2015-02-24 00:38:26 +0100 |
commit | 6aabb5176a176f3413a446ad13178eb25c4c90fd (patch) | |
tree | 61ffadb66b61a60ffb745a8ff3845aa114e91e42 /lib/diameter/test/diameter_transport_SUITE.erl | |
parent | 5f6399fb9f5d1552bb0050b18e1c9a9085d8b5db (diff) | |
download | otp-6aabb5176a176f3413a446ad13178eb25c4c90fd.tar.gz otp-6aabb5176a176f3413a446ad13178eb25c4c90fd.tar.bz2 otp-6aabb5176a176f3413a446ad13178eb25c4c90fd.zip |
Fix SCTP match blunder in suites
More than an incoming message can contain ancillary data, which the
gen_sctp and transport suites did not expect. On FreeBSD 10, an
sctp_assoc_change event appears always to contain ancillary data.
Diffstat (limited to 'lib/diameter/test/diameter_transport_SUITE.erl')
-rw-r--r-- | lib/diameter/test/diameter_transport_SUITE.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/diameter/test/diameter_transport_SUITE.erl b/lib/diameter/test/diameter_transport_SUITE.erl index 64015f3336..84ab6cbdc4 100644 --- a/lib/diameter/test/diameter_transport_SUITE.erl +++ b/lib/diameter/test/diameter_transport_SUITE.erl @@ -424,7 +424,11 @@ gen_send(tcp, Sock, Bin) -> gen_recv(sctp, Sock) -> {_OS, _IS, Id} = getr(assoc), - ?RECV(?SCTP(Sock, {[#sctp_sndrcvinfo{assoc_id = Id}], Bin}), Bin); + receive + ?SCTP(Sock, {[#sctp_sndrcvinfo{assoc_id = Id}], Bin}) + when is_binary(Bin) -> + Bin + end; gen_recv(tcp, Sock) -> tcp_recv(Sock, <<>>). |