Rename 'MAX_LEN' to 'MAX_PACKET_LEN'

This commit is contained in:
Feng Lee 2017-02-21 20:11:09 +08:00
parent 4d2d6fa0d6
commit 17953a4716
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ serialize_header(#mqtt_packet_header{type = Type,
{VariableBin, PayloadBin}) {VariableBin, PayloadBin})
when ?CONNECT =< Type andalso Type =< ?DISCONNECT -> when ?CONNECT =< Type andalso Type =< ?DISCONNECT ->
Len = byte_size(VariableBin) + byte_size(PayloadBin), Len = byte_size(VariableBin) + byte_size(PayloadBin),
true = (Len =< ?MAX_LEN), true = (Len =< ?MAX_PACKET_LEN),
[<<Type:4, (opt(Dup)):1, (opt(Qos)):2, (opt(Retain)):1>>, [<<Type:4, (opt(Dup)):1, (opt(Qos)):2, (opt(Retain)):1>>,
serialize_len(Len), VariableBin, PayloadBin]. serialize_len(Len), VariableBin, PayloadBin].