Fixed DATA connection initialization logic
commit6586dcf78ba9e0c101c16a5c2d8ce2474e275452
authorYury V. Zaytsev <yury@shurup.com>
Sat, 11 Sep 2010 19:01:54 +0000 (11 21:01 +0200)
committerYury V. Zaytsev <yury@shurup.com>
Wed, 15 Sep 2010 11:49:02 +0000 (15 13:49 +0200)
tree10324e410d9e8726aa9b1393f3d62b75fa91067b
parenta27725d7a35c21e8dbe97b6f98324710e8df33e9
Fixed DATA connection initialization logic

Factored out error checking from ftpfs_initconn into
ftpfs_init_data_socket and fixed the logic of the initialization of DATA
connection. Now initialization of passive connection is retried if
needed after the failure to open the socket.

Got rid of goto statements and divided the code in two parts (passive &
active). Initial state is now properly restored after the function runs.

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