Comment 9 for bug 515507

Revision history for this message
Greg (greg-apieum) wrote :

Hi,
Sorry, there were errors on last push.

SFTP was serving to all adresses if it was not set in config,
and I've defined 'ftp_server_address' and not 'ftp_server_host' as config parameter. ^^

I push new commits but keep "detect_ip_addr() from tools.misc"
to set the host to serve if ftp_server_host or sftp_server_host are not set in config file.
Here the code:
<code>
from tools.misc import detect_ip_addr
if detect_ip_addr:
    HOST = config.get('ftp_server_host', detect_ip_addr())
else:
    HOST = config.get('ftp_server_host', '127.0.0.1')
</code>

I hope that's good for you, but take care maybe I don't use the same revision as your patch.

I'm a newbie in python and new on the community, feel free to tell me if there is something wrong.
Regards