curl-library
RE: OS400 ftp server related problem
Date: Mon, 17 Aug 2009 18:12:36 +0200
Patrick Monnerat wrote:
> I can write a patch that does:
> PWD -->
> <-- 257 "QGPL" is current library.
> If the initial directory character is not a '/', then
> SYST -->
> <-- 215 OS/400 is the remote operating system. The TCP/IP
version is "V5R4M0".
> If the string contains " OS/400 ", then
> SITE NAMEFMT 1 -->
> <-- 250 Now using naming format "1".
> PWD -->
> <-- 257 "/QSYS.LIB/QGPL.LIB" is current library.
Please find the patch in attachment.
As stated in the above pseudo-code, it only gets the system name when
the path does not start with a '/', to minimise overhead on systems with
"regular" path. However, it is easy to move this code and perform the
"SYST" command unconditionally if needed sometime.
The patch latches the OS name in a new ftp_conn structure field
(server_os), in case someone needs it elsewhere in the code.
Daniel, I'm waiting your approval before commit.
Regards,
Patrick
- application/octet-stream attachment: curl-ftpserver.patch