On Wed, 09 Jul 2003 21:47:49 -0400, Glenn McCorkle
THERE SHOULD BE SPACE BEFORE '234'.
> Hold off for a while.

> After seeing what Michal wrote.
> It looks like I need to ammend my 'fix'
> __________________________________________________________________________
> On Wed, 09 Jul 2003 18:42:38 +0200, Michal H. Tyc wrote:

>> From RFC 959: (URL="http://www.freesoft.org/CIE/RFC/959/24.htm";)

>> For example:

>> 123-First line
>> Second line
>> 234 A line beginning with numbers
>> 123 The last line

THERE SHOULD BE SPACE BEFORE '234'.
Intermediary lines beginning with numbers need to be 'escaped'.
Please look below and at the URL I gave.

>> The user-process then simply needs to search for the second
>> occurrence of the same reply code, followed by <SP> (Space), at
>> the beginning of a line, and ignore all intermediary lines.  If
>> an intermediary line begins with a 3-digit number, the Server
>> must pad the front to avoid confusion.

>> On Wed, 09 Jul 2003 02:38:26 +00, Bastiaan Edelman, PA3FFZ wrote:

>>> 230-Welkom op de FTP-server van Hetnet
>>> #230 User ba8tian logged in
>>> 215 Windows_NT version 5.0
>>> 250 CWD command successful
>>> 257 "/" is current directory
>>> 200 Type set to A
>>> 200 Port command successful

> Michal,
> Does this look like it will 'do the trick' ???

> I'll wait for your reply before compiling this.

> --- in ftp.c ---
> while(buffer[3]=='-' || buffer[4]=='-' || buffer[0]==' ' || buffer[0]=='#');
> //continued message!

I'm afraid it won't.
If I understand well, the above line of code causes all lines beginning
with '#' to be treated as intermediary lines (and therefore to be
ignored).
But Bastiaan's server inserts '#' into the LAST line,
which should not be ignored, but interpreted according to its
three-digit code. It can't be clearly deduced from that single line,
but it looks like Arachne delays interpreting the answer code
until the last line ("<digit><digit><digit><space><text>").
In this case, the solution would be:

  if (buffer[0] == '#')
    movemem(buffer[1], buffer[0], sizeof(buffer) - 1);

where 
  void movemem(char* from_address, char* to_address, int length)
is some function that moves a memory block, whatever it is called
in C language.
[I'm sorry about my C syntax, I 'speak' well only x86 assembler,
Pascal and Fortran-77 ;-)]

Michal

Reply via email to