Fixed passive FTP connection logic
commitada1848268bef5affdbe7e5abef7abf0ad7b74fa
authorYury V. Zaytsev <yury@shurup.com>
Sat, 11 Sep 2010 08:57:43 +0000 (11 10:57 +0200)
committerYury V. Zaytsev <yury@shurup.com>
Wed, 15 Sep 2010 11:49:02 +0000 (15 13:49 +0200)
tree230e44b14fbb6e5daa781d6f9efd61d271f4b5f0
parenta402ebc98104d3b056d127f3378b0d89c674068c
Fixed passive FTP connection logic

In current implementation few issues were fixed making passive
connection scheme more reliable:

    * If it's IPV4, try PASV first, as some servers and ALGs get
      confused by EPSV, and only then EPSV as a fallback

    * When trying PASV or EPSV, actually try to connect to the provided
      port and if the connection fails, still try the next method

    * PASV and EPSV response parsing code was factored out in separate
      routines for clarity

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
lib/vfs/mc-vfs/ftpfs.c