hi,
here is the initial patch (pre-pre-pre-alpha! just a demo/test) for adding ftp support to stunnel-4.11.
Known bugs: 1) only tested under linux. debian 3.1 (testing), gcc version 3.3.5 (Debian 1:3.3.5-13) 2) ftp_alloc_port() in ftp.c is not yet finished. just a demo; 3) only works when configured with --with-threads=ucontext. does not work with --with-threads=pthread! 4) libwrap support is not tested. 5) only tested with flashfxp (3.0.2 build(1043) implicit SSL); 6) still contains memory leaks. 7) can only successfully transfer(RETR) small files whose size is less than about 90K bytes. stunnel hangs while transferring a larger file, looks like poll() in scan_waiting_queue() (network.c line 164) can not receive a POLLOUT event from ssl_wfd->fd after successfully transfered 90K bytes. the log file is also included in this mail.
bug #7 really frustrats me. still do not know why. could anyone please give me some hints?
Zhuang Yuyao.