diff options
author | Hans Nilsson <[email protected]> | 2016-10-18 13:41:04 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2016-10-18 13:41:04 +0200 |
commit | dce8f71b473a093fb2fa01ac00ea791e4c23cef3 (patch) | |
tree | 8da92e1d36c85e3f6bf21d7bd5b4615e2ab78bcb /lib/inets/src/ftp | |
parent | 1550204bed17ecdcc59a53332bcdfa2ba246944a (diff) | |
parent | 2fa04b1a2b209c7e952eb931d6f5214dc2788390 (diff) | |
download | otp-dce8f71b473a093fb2fa01ac00ea791e4c23cef3.tar.gz otp-dce8f71b473a093fb2fa01ac00ea791e4c23cef3.tar.bz2 otp-dce8f71b473a093fb2fa01ac00ea791e4c23cef3.zip |
Merge branch 'hans/inets/ftp_locks/OTP-13967' into maint
Diffstat (limited to 'lib/inets/src/ftp')
-rw-r--r-- | lib/inets/src/ftp/ftp.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl index 8bad91bf98..6868b75eff 100644 --- a/lib/inets/src/ftp/ftp.erl +++ b/lib/inets/src/ftp/ftp.erl @@ -108,6 +108,7 @@ -define(DBG(F,A), 'n/a'). %%-define(DBG(F,A), io:format(F,A)). +%%-define(DBG(F,A), if is_list(F) -> ct:pal(F,A); is_atom(F)->ct:pal(atom_to_list(F),A) end). %%%========================================================================= %%% API - CLIENT FUNCTIONS @@ -2361,14 +2362,17 @@ send_message({ssl, Socket}, Message) -> activate_ctrl_connection(#state{csock = Socket, ctrl_data = {<<>>, _, _}}) -> activate_connection(Socket); activate_ctrl_connection(#state{csock = Socket}) -> + activate_connection(Socket), %% We have already received at least part of the next control message, %% that has been saved in ctrl_data, process this first. - self() ! {tcp, unwrap_socket(Socket), <<>>}. + self() ! {socket_type(Socket), unwrap_socket(Socket), <<>>}. unwrap_socket({tcp,Socket}) -> Socket; unwrap_socket({ssl,Socket}) -> Socket; unwrap_socket(Socket) -> Socket. +socket_type({tcp,_Socket}) -> tcp; +socket_type({ssl,_Socket}) -> ssl. activate_data_connection(#state{dsock = Socket} = State) -> activate_connection(Socket), |