aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-10-16 14:30:03 +0200
committerBjörn Gustavsson <[email protected]>2012-10-26 11:28:41 +0200
commit1f067507afc218516c04f1e4b05e9fab66b3f9c6 (patch)
treec3061ff2e1cb4c4c8e7319a7f88761428a85637b /lib/test_server
parent640666b329df0ab6a22af1cde1293df2ef63b88c (diff)
downloadotp-1f067507afc218516c04f1e4b05e9fab66b3f9c6.tar.gz
otp-1f067507afc218516c04f1e4b05e9fab66b3f9c6.tar.bz2
otp-1f067507afc218516c04f1e4b05e9fab66b3f9c6.zip
Refactor the handling of the make_priv_dir message
The code is not actually shorter, but it avoids duplicating the code for producing an error tuple when theres is no priv_dir tuple in the config data.
Diffstat (limited to 'lib/test_server')
-rw-r--r--lib/test_server/src/test_server.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl
index 3938dfdc30..d2f8acba6c 100644
--- a/lib/test_server/src/test_server.erl
+++ b/lib/test_server/src/test_server.erl
@@ -714,12 +714,13 @@ run_test_case_msgloop(#st{ref=Ref,pid=Pid,end_conf_pid=EndConfPid0}=St0) ->
From ! {self(),set_curr_conf,ok},
St = St0#st{config=Config},
run_test_case_msgloop(St);
- {make_priv_dir,From} when St0#st.config =:= undefined ->
- From ! {self(),make_priv_dir,{error,no_priv_dir_in_config}},
- run_test_case_msgloop(St0);
{make_priv_dir,From} ->
+ Config = case St0#st.config of
+ undefined -> [];
+ Config0 -> Config0
+ end,
Result =
- case proplists:get_value(priv_dir, St0#st.config) of
+ case proplists:get_value(priv_dir, Config) of
undefined ->
{error,no_priv_dir_in_config};
PrivDir ->