From 0058430352420a8c0dc053900f108e7086f52fad Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Thu, 22 May 2014 11:01:45 +0200 Subject: Replace traffic-related log reports with no-op function calls The former were a little over-enthusiastic and could cause a node to be logged to death if a peer Diameter node was sufficiently ill-willed. The function calls are to diameter_lib:log/4, the arguments of which identify the happening in question, and which does nothing but provide a function to trace on. Many existing log calls have been shrunk. The only remaining traffic-related report (hopefully) is that resulting from {answer_errors, report} config, and this has been slimmed. --- lib/diameter/include/diameter_gen.hrl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/diameter/include') diff --git a/lib/diameter/include/diameter_gen.hrl b/lib/diameter/include/diameter_gen.hrl index c8f706dc3e..319ad5a783 100644 --- a/lib/diameter/include/diameter_gen.hrl +++ b/lib/diameter/include/diameter_gen.hrl @@ -320,10 +320,12 @@ d(Name, Avp, {Avps, Acc}) -> %% respond sensibly to. Log the occurence for traceability, %% but the peer will also receive info in the resulting %% answer-message. - diameter_lib:log({decode, failure}, + Stack = diameter_lib:get_stacktrace(), + diameter_lib:log(decode_error, ?MODULE, ?LINE, - {Reason, Avp, erlang:get_stacktrace()}), + {Reason, AvpName, Stack}), + {Rec, Failed} = Acc, {[Avp|Avps], {Rec, [rc(Reason, Avp) | Failed]}} after -- cgit v1.2.3