aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_peer_fsm.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-07-08 13:42:37 +0200
committerAnders Svensson <[email protected]>2015-08-04 17:33:37 +0200
commit4c1e79bf4582e19cd7b4225fb867b4f088895294 (patch)
tree0752a58780f7ec274e5419aa2bc625b2ba27a800 /lib/diameter/src/base/diameter_peer_fsm.erl
parentf3fefbae24a2569a13b538d80d0e99129963ebef (diff)
downloadotp-4c1e79bf4582e19cd7b4225fb867b4f088895294.tar.gz
otp-4c1e79bf4582e19cd7b4225fb867b4f088895294.tar.bz2
otp-4c1e79bf4582e19cd7b4225fb867b4f088895294.zip
Truncate potentially large terms passed to diameter_lib:log/4
Last visited in commit 00584303.
Diffstat (limited to 'lib/diameter/src/base/diameter_peer_fsm.erl')
-rw-r--r--lib/diameter/src/base/diameter_peer_fsm.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_peer_fsm.erl b/lib/diameter/src/base/diameter_peer_fsm.erl
index 2255d0a76b..a9ee4940a3 100644
--- a/lib/diameter/src/base/diameter_peer_fsm.erl
+++ b/lib/diameter/src/base/diameter_peer_fsm.erl
@@ -319,7 +319,7 @@ handle_info(T, #state{} = State) ->
?LOG(stop, Reason),
{stop, {shutdown, Reason}, State};
stop ->
- ?LOG(stop, T),
+ ?LOG(stop, truncate(T)),
{stop, {shutdown, T}, State}
catch
exit: {diameter_codec, encode, T} = Reason ->
@@ -355,6 +355,11 @@ code_change(_, State, _) ->
%% ---------------------------------------------------------------------------
%% ---------------------------------------------------------------------------
+truncate({'DOWN' = T, _, process, Pid, _}) ->
+ {T, Pid};
+truncate(T) ->
+ T.
+
putr(Key, Val) ->
put({?MODULE, Key}, Val).