diff options
Diffstat (limited to 'lib/ftp/src/ftp_response.erl')
-rw-r--r-- | lib/ftp/src/ftp_response.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ftp/src/ftp_response.erl b/lib/ftp/src/ftp_response.erl index 8d00153ba8..053b6893f8 100644 --- a/lib/ftp/src/ftp_response.erl +++ b/lib/ftp/src/ftp_response.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2018. All Rights Reserved. +%% Copyright Ericsson AB 2005-2023. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ %% %CopyrightEnd% %% %% -%% Description: This module impements handling of ftp server responses. +%% Description: This module implements handling of ftp server responses. -module(ftp_response). @@ -50,7 +50,7 @@ %% {continue, {Data, %% AccLines, StatusCode}} %% -%% Data = binary() - data recived on the control connection from the +%% Data = binary() - data received on the control connection from the %% ftp-server. %% AccLines = [string()] %% StatusCode = start | {byte(), byte(), byte()} | finish - @@ -80,7 +80,7 @@ %% Make sure we received the first 4 bytes so we know how to parse %% the FTP server response e.i. is the response composed of one %% or multiple lines. -parse_lines(Bin, Lines, start) when size(Bin) < 4 -> +parse_lines(Bin, Lines, start) when is_binary(Bin), byte_size(Bin) < 4 -> {continue, {Bin, Lines, start}}; %% Multiple lines exist parse_lines(<<C1, C2, C3, $-, Rest/binary>>, Lines, start) -> @@ -95,7 +95,7 @@ parse_lines(<<?CR, ?LF, C1, C2, C3, ?WHITE_SPACE, Rest/binary>>, Lines, {C1, C2, %% Potential end found wait for more data parse_lines(<<?CR, ?LF, C1, C2, C3>> = Bin, Lines, {C1, C2, C3}) -> {continue, {Bin, Lines, {C1, C2, C3}}}; -%% Intermidate line begining with status code +%% Intermidate line beginning with status code parse_lines(<<?CR, ?LF, C1, C2, C3, Rest/binary>>, Lines, {C1, C2, C3}) -> parse_lines(Rest, [C3, C2, C1, ?LF, ?CR | Lines], {C1, C2, C3}); @@ -184,7 +184,7 @@ interpret_status(?POS_PREL,_,_) -> pos_prel; interpret_status(?POS_COMPL, ?AUTH_ACC, 4) -> tls_upgrade; %% Positive Completion Reply interpret_status(?POS_COMPL,_,_) -> pos_compl; -%% Positive Intermediate Reply nedd account +%% Positive Intermediate Reply need account interpret_status(?POS_INTERM,?AUTH_ACC,2) -> pos_interm_acct; %% Positive Intermediate Reply interpret_status(?POS_INTERM,_,_) -> pos_interm; |