From 6fc2b7bf5eb331fdc1c0fb93758dad5a741da4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Dimitrov?= Date: Tue, 27 Mar 2018 13:21:44 +0200 Subject: common_test: Remove dependency to inets ftp - Update ct_ftp to use the new FTP application. Change-Id: I84223107361132ea3144cdf7421738c4bebffa40 --- lib/common_test/doc/src/ct_ftp.xml | 6 ++---- lib/common_test/src/common_test.app.src | 1 + lib/common_test/src/ct_ftp.erl | 8 ++++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/common_test/doc/src/ct_ftp.xml b/lib/common_test/doc/src/ct_ftp.xml index e8c6f72db7..a6f01dd58e 100644 --- a/lib/common_test/doc/src/ct_ftp.xml +++ b/lib/common_test/doc/src/ct_ftp.xml @@ -33,13 +33,11 @@ ct_ftp.xml ct_ftp - FTP client module (based on the FTP support of the Inets - application). + FTP client module (based on the FTP application). -

FTP client module (based on the FTP support of the Inets - application).

+

FTP client module (based on the ftp application).

diff --git a/lib/common_test/src/common_test.app.src b/lib/common_test/src/common_test.app.src index 9becde110b..f686003637 100644 --- a/lib/common_test/src/common_test.app.src +++ b/lib/common_test/src/common_test.app.src @@ -85,6 +85,7 @@ "crypto-3.6", "debugger-4.1", "erts-7.0", + "ftp-1.0.0", "inets-6.0", "kernel-4.0", "observer-2.1", diff --git a/lib/common_test/src/ct_ftp.erl b/lib/common_test/src/ct_ftp.erl index ee4a6a6c45..8b02ae3a0f 100644 --- a/lib/common_test/src/ct_ftp.erl +++ b/lib/common_test/src/ct_ftp.erl @@ -18,7 +18,7 @@ %% %CopyrightEnd% %% -%%% @doc FTP client module (based on the FTP support of the INETS application). +%%% @doc FTP client module (based on the FTP application). %%% %%% @type connection() = handle() | ct:target_name() %%% @type handle() = ct_gen_conn:handle(). Handle for a specific @@ -292,8 +292,8 @@ init(KeyOrName,{IP,Port},{Username,Password}) -> end. ftp_connect(IP,Port,Username,Password) -> - _ = inets:start(), - case inets:start(ftpc,[{host,IP},{port,Port}]) of + _ = ftp:start(), + case ftp:start_service([{host,IP},{port,Port}]) of {ok,FtpPid} -> case ftp:user(FtpPid,Username,Password) of ok -> @@ -341,7 +341,7 @@ reconnect(_Addr,_State) -> terminate(FtpPid,State) -> log(heading(terminate,State#state.target_name), "Closing FTP connection.\nHandle: ~p\n",[FtpPid]), - inets:stop(ftpc,FtpPid). + ftp:stop_service(FtpPid). %%%================================================================= -- cgit v1.2.3