diff --git a/lib/tftp/src/tftp.erl b/lib/tftp/src/tftp.erl index 431baa4cf0a5..80dec64b9cea 100644 --- a/lib/tftp/src/tftp.erl +++ b/lib/tftp/src/tftp.erl @@ -118,15 +118,6 @@ in parallel with the ongoing one, the server consumes less resources. stop/0 ]). -%% Application local functions --export([ - start_standalone/1, - start_service/1, - stop_service/1, - services/0, - service_info/1 - ]). - -export_type([option/0]). -include("tftp.hrl"). @@ -529,29 +520,3 @@ start() -> stop() -> application:stop(tftp). -%%------------------------------------------------------------------- -%% Inets service behavior -%%------------------------------------------------------------------- - --doc false. -start_standalone(Options) -> - start(Options). - --doc false. -start_service(Options) -> - tftp_sup:start_child(Options). - --doc false. -stop_service(Pid) -> - tftp_sup:stop_child(Pid). - --doc false. -services() -> - tftp_sup:which_children(). - --doc false. -service_info(Pid) -> - info(Pid). - - - diff --git a/lib/tftp/test/tftp_SUITE.erl b/lib/tftp/test/tftp_SUITE.erl index 35582a4388ea..bf74b7a56eee 100644 --- a/lib/tftp/test/tftp_SUITE.erl +++ b/lib/tftp/test/tftp_SUITE.erl @@ -84,8 +84,7 @@ all() -> resend_server, large_file, app, - appup, - start_tftpd + appup ]. groups() -> @@ -115,36 +114,6 @@ appup() -> appup(Config) when is_list(Config) -> ok = test_server:appup_test(tftp). -start_tftpd() -> - [{doc, "Start/stop of tfpd service"}]. -start_tftpd(Config) when is_list(Config) -> - process_flag(trap_exit, true), - ok = tftp:start(), - {ok, Pid0} = tftp:start_service([{host, "localhost"}, {port, 0}]), - Pids0 = [ServicePid || {_, ServicePid} <- tftp:services()], - true = lists:member(Pid0, Pids0), - {ok, [_|_]} = tftp:service_info(Pid0), - tftp:stop_service(Pid0), - ct:sleep(100), - Pids1 = [ServicePid || {_, ServicePid} <- tftp:services()], - false = lists:member(Pid0, Pids1), - - {ok, Pid1} = - tftp:start_standalone([{host, "localhost"}, {port, 0}]), - Pids2 = [ServicePid || {_, ServicePid} <- tftp:services()], - false = lists:member(Pid1, Pids2), - %% Standalone service is not supervised - {error,not_found} = tftp:stop_service(Pid1), - ok = tftp:stop(), - - application:load(tftp), - application:set_env(tftp, services, [{tftpd, [{host, "localhost"}, - {port, 0}]}]), - ok = tftp:start(), - 1 = length(tftp:services()), - application:unset_env(tftp, services), - ok = tftp:stop(). - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Simple