ftp: change the twisted hack necessary for async-write-close, to one more agreeable to the twisted-dev folks, add a copy of the necessary patch to docs/ftp.txt

This commit is contained in:
Brian Warner
2008-10-06 18:06:05 -07:00
parent 70ae1bfc8e
commit 05a8360177
3 changed files with 87 additions and 46 deletions

View File

@ -255,15 +255,14 @@ class Client(node.Node, testutil.PollMixin):
self.add_service(ws)
def init_ftp_server(self):
if not self.get_config("ftpd", "enabled", False, boolean=True):
return
portstr = self.get_config("ftpd", "ftp.port", "8021")
accountfile = self.get_config("ftpd", "ftp.accounts.file", None)
accounturl = self.get_config("ftpd", "ftp.accounts.url", None)
if self.get_config("ftpd", "enabled", False, boolean=True):
accountfile = self.get_config("ftpd", "ftp.accounts.file", None)
accounturl = self.get_config("ftpd", "ftp.accounts.url", None)
ftp_portstr = self.get_config("ftpd", "ftp.port", "8021")
from allmydata import ftpd
s = ftpd.FTPServer(self, portstr, accountfile, accounturl)
s.setServiceParent(self)
from allmydata import ftpd
s = ftpd.FTPServer(self, accountfile, accounturl, ftp_portstr)
s.setServiceParent(self)
def _check_hotline(self, hotline_file):
if os.path.exists(hotline_file):