summaryrefslogtreecommitdiff
path: root/lib/diameter/src/info/diameter_dbg.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/diameter/src/info/diameter_dbg.erl')
-rw-r--r--lib/diameter/src/info/diameter_dbg.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/diameter/src/info/diameter_dbg.erl b/lib/diameter/src/info/diameter_dbg.erl
index 718bbb582b..8ad393eb82 100644
--- a/lib/diameter/src/info/diameter_dbg.erl
+++ b/lib/diameter/src/info/diameter_dbg.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2022. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2023. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -203,7 +203,7 @@ pp(<<Version:8, MsgLength:24,
"Application id",
"Hop by hop id",
"End to end id"],
- [Version, MsgLength, size(AVPs) + 20,
+ [Version, MsgLength, byte_size(AVPs) + 20,
Rbit, Pbit, Ebit, Tbit, Reserved,
CmdCode,
ApplId,
@@ -214,11 +214,11 @@ pp(<<Version:8, MsgLength:24,
N;
pp(<<_Version:8, MsgLength:24, _/binary>> = Bin) ->
- {bad_message_length, MsgLength, size(Bin)};
+ {bad_message_length, MsgLength, byte_size(Bin)};
pp(Bin)
when is_binary(Bin) ->
- {truncated_binary, size(Bin)};
+ {truncated_binary, byte_size(Bin)};
pp(_) ->
not_binary.
@@ -273,7 +273,7 @@ avp(0, Data, Length, Size) ->
data(Data, Length, Size).
data(Bin, Length, Size)
- when size(Bin) >= Length ->
+ when is_binary(Bin), byte_size(Bin) >= Length ->
<<AVP:Length/binary, Rest/binary>> = Bin,
ppp({"Data", AVP}),
unpad(Rest, Size - Length, Length rem 4);
@@ -288,7 +288,7 @@ unpad(Bin, Size, N) ->
un(Bin, Size, 4 - N).
un(Bin, Size, N)
- when size(Bin) >= N ->
+ when is_binary(Bin), byte_size(Bin) >= N ->
ppp({"Padding bytes", N}),
<<Pad:N/binary, Rest/binary>> = Bin,
Bits = N*8,
@@ -357,7 +357,7 @@ p(T) ->
stop() ->
dbg:ctp(),
- dbg:stop_clear().
+ dbg:stop().
%% tpl/1
%% tp/1