aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-04-16 02:31:35 +0200
committerAnders Svensson <[email protected]>2017-06-12 16:13:52 +0200
commit0911c97768caeb908c3f18fd1ba514c1c7f273d5 (patch)
tree34b6b1771052b3615ca870a57b8575e51df551e6 /lib/diameter
parent501cd3fae71dcbcf56da55748abd82b512127220 (diff)
downloadotp-0911c97768caeb908c3f18fd1ba514c1c7f273d5.tar.gz
otp-0911c97768caeb908c3f18fd1ba514c1c7f273d5.tar.bz2
otp-0911c97768caeb908c3f18fd1ba514c1c7f273d5.zip
Decode message header in a single match
Diffstat (limited to 'lib/diameter')
-rw-r--r--lib/diameter/src/base/diameter_codec.erl4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_codec.erl b/lib/diameter/src/base/diameter_codec.erl
index 3a2f1caf2b..73da9398f3 100644
--- a/lib/diameter/src/base/diameter_codec.erl
+++ b/lib/diameter/src/base/diameter_codec.erl
@@ -399,14 +399,12 @@ decode_avps(MsgName, Mod, Pkt, Avps) -> %% ... or not
decode_header(<<Version:8,
MsgLength:24,
- CmdFlags:1/binary,
+ R:1, P:1, E:1, T:1, _:4,
CmdCode:24,
ApplicationId:32,
HopByHopId:32,
EndToEndId:32,
_/binary>>) ->
- <<R:1, P:1, E:1, T:1, _:4>>
- = CmdFlags,
%% 3588 (ch 3) says that reserved bits MUST be set to 0 and ignored
%% by the receiver.