Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
3223-common_test-Do-not-use-deprecated-ftp-API....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3223-common_test-Do-not-use-deprecated-ftp-API.patch of Package erlang
From 81b1854c204536d071bbe8f7dbb47807059d1333 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin <ingela@erlang.org> Date: Sun, 21 Feb 2021 12:31:02 +0100 Subject: [PATCH 3/3] 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. --- lib/common_test/src/ct_ftp.erl | 5 ++--- 1 file 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). %%%================================================================= -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor