diff options
author | Ingela Anderton Andin <ingela@erlang.org> | 2021-02-21 12:31:02 +0100 |
---|---|---|
committer | Ingela Anderton Andin <ingela@erlang.org> | 2021-02-21 12:33:30 +0100 |
commit | 81b1854c204536d071bbe8f7dbb47807059d1333 (patch) | |
tree | 00399dcba6f7ce5dd08caf06d584a04a1b27b95e | |
parent | 16ff6b8bc7d36ed21811bd33498b9fd700e337db (diff) | |
download | erlang-81b1854c204536d071bbe8f7dbb47807059d1333.tar.gz |
common_test: Do not use deprecated ftp API
Note before the deprecation the now used API behaved
in an unwanted way, it now behaves well and legacy
inets related functions are deprecated.
-rw-r--r-- | lib/common_test/src/ct_ftp.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/common_test/src/ct_ftp.erl b/lib/common_test/src/ct_ftp.erl index b2fdebb6a9..911bdbbf67 100644 --- a/lib/common_test/src/ct_ftp.erl +++ b/lib/common_test/src/ct_ftp.erl @@ -19,7 +19,6 @@ %% -module(ct_ftp). --compile({nowarn_deprecated_function, [{ftp,start_service,1}, {ftp,stop_service,1}]}). %% API -export([get/3,put/3, open/1,close/1, send/2,send/3, @@ -164,7 +163,7 @@ init(KeyOrName,{IP,Port},{Username,Password}) -> ftp_connect(IP,Port,Username,Password) -> _ = ftp:start(), - case ftp:start_service([{host,IP},{port,Port}]) of + case ftp:open(IP,[{port,Port}]) of {ok,FtpPid} -> case ftp:user(FtpPid,Username,Password) of ok -> @@ -209,7 +208,7 @@ reconnect(_Addr,_State) -> terminate(FtpPid,State) -> log(heading(terminate,State#state.target_name), "Closing FTP connection.\nHandle: ~p\n",[FtpPid]), - ftp:stop_service(FtpPid). + ftp:close(FtpPid). %%%================================================================= |