aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2013-09-23 09:53:13 +0200
committerAnders Svensson <[email protected]>2013-11-28 17:27:27 +0100
commit5682e18c8a31e3c32e9abd41120b2c1ae4c6930f (patch)
tree63a1f1c14934abe83c5e0cc4947ebf8f6e143bb0 /lib/diameter
parentda973668bcfee7cba0aa6e0c498fee4aa1b24cce (diff)
downloadotp-5682e18c8a31e3c32e9abd41120b2c1ae4c6930f.tar.gz
otp-5682e18c8a31e3c32e9abd41120b2c1ae4c6930f.tar.bz2
otp-5682e18c8a31e3c32e9abd41120b2c1ae4c6930f.zip
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).
Diffstat (limited to 'lib/diameter')
-rw-r--r--lib/diameter/src/compiler/diameter_codegen.erl9
1 files changed, 8 insertions, 1 deletions
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}).
+
%% ===========================================================================
%% ===========================================================================