diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftp/src/ftp.erl | 19 | ||||
-rw-r--r-- | lib/inets/src/inets_app/inets_ftp_wrapper.erl | 5 |
2 files changed, 22 insertions, 2 deletions
diff --git a/lib/ftp/src/ftp.erl b/lib/ftp/src/ftp.erl index 6bf83184e3..083ca9fc87 100644 --- a/lib/ftp/src/ftp.erl +++ b/lib/ftp/src/ftp.erl @@ -31,6 +31,10 @@ service_info/1 ]). +%% Added for backward compatibility +%% Called by inets:start() +-export([start_standalone/1]). + -export([start_link/1, start_link/2]). %% API - Client interface @@ -128,6 +132,21 @@ start() -> application:start(ftp). +start_standalone(Options) -> + try + {ok, StartOptions} = start_options(Options), + {ok, OpenOptions} = open_options(Options), + case start_link(StartOptions, []) of + {ok, Pid} -> + call(Pid, {open, ip_comm, OpenOptions}, plain); + Error1 -> + Error1 + end + catch + throw:Error2 -> + Error2 + end. + start_service(Options) -> try {ok, StartOptions} = start_options(Options), diff --git a/lib/inets/src/inets_app/inets_ftp_wrapper.erl b/lib/inets/src/inets_app/inets_ftp_wrapper.erl index b3fc7a8436..e350a490f7 100644 --- a/lib/inets/src/inets_app/inets_ftp_wrapper.erl +++ b/lib/inets/src/inets_app/inets_ftp_wrapper.erl @@ -27,8 +27,9 @@ service_info/1]). -start_standalone(_) -> - ok. +start_standalone(Options) -> + ftp:start_standalone(Options). + start_service(Options) -> application:ensure_started(ftp), |