From 5682e18c8a31e3c32e9abd41120b2c1ae4c6930f Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Mon, 23 Sep 2013 09:53:13 +0200 Subject: Don't pollute process dictionary in diameter_codegen:from_dict/4 Didn't matter before diameter_make since the module was only called from diameterc(1). --- lib/diameter/src/compiler/diameter_codegen.erl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/diameter') diff --git a/lib/diameter/src/compiler/diameter_codegen.erl b/lib/diameter/src/compiler/diameter_codegen.erl index 325a37e20d..f2c10f1748 100644 --- a/lib/diameter/src/compiler/diameter_codegen.erl +++ b/lib/diameter/src/compiler/diameter_codegen.erl @@ -58,7 +58,11 @@ from_dict(File, ParseD, Opts, Mode) -> Outdir = proplists:get_value(outdir, Opts, "."), putr(verbose, lists:member(verbose, Opts)), - codegen(File, ParseD, Outdir, Mode). + try + codegen(File, ParseD, Outdir, Mode) + after + eraser(verbose) + end. %% Optional reports when running verbosely. report(What, Data) -> @@ -76,6 +80,9 @@ putr(Key, Value) -> getr(Key) -> get({?MODULE, Key}). +eraser(Key) -> + erase({?MODULE, Key}). + %% =========================================================================== %% =========================================================================== -- cgit v1.2.3