aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tftp/src
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2018-03-27 11:01:22 +0200
committerPéter Dimitrov <[email protected]>2018-03-28 10:19:38 +0200
commit8a805f67cff9bf04188d38dca3f0031455c73e90 (patch)
treeaf2de3add9698c52a90d385e7e1e40c4fab452f3 /lib/tftp/src
parent6af39a440826d5d1653dad9e1eb47a397921471a (diff)
downloadotp-8a805f67cff9bf04188d38dca3f0031455c73e90.tar.gz
otp-8a805f67cff9bf04188d38dca3f0031455c73e90.tar.bz2
otp-8a805f67cff9bf04188d38dca3f0031455c73e90.zip
tftp: Add tests (app, appup, start_tftpd)
Change-Id: I585ba5097632d460705257f03cb44adf8038f0be
Diffstat (limited to 'lib/tftp/src')
-rw-r--r--lib/tftp/src/tftp_app.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/tftp/src/tftp_app.erl b/lib/tftp/src/tftp_app.erl
index bbcd107e30..80d54c6cbe 100644
--- a/lib/tftp/src/tftp_app.erl
+++ b/lib/tftp/src/tftp_app.erl
@@ -36,7 +36,8 @@
%%====================================================================
start(_StartType, _StartArgs) ->
- tftp_sup:start_link([]).
+ Config = get_configuration(),
+ tftp_sup:start_link(Config).
%%--------------------------------------------------------------------
stop(_State) ->
@@ -45,3 +46,11 @@ stop(_State) ->
%%====================================================================
%% Internal functions
%%====================================================================
+
+get_configuration() ->
+ case (catch application:get_env(tftp, services)) of
+ {ok, Services} ->
+ Services;
+ _ ->
+ []
+ end.