forked from Imagelibrary/rtems
PR 1998/networking - Move ftpd root initialization
From: Xiangfu <xiangfu@sharism.cc> Signed-off-by: Xiangfu <xiangfu@sharism.cc>
This commit is contained in:
@@ -2068,6 +2068,13 @@ rtems_initialize_ftpd(void)
|
||||
|
||||
ftpd_access = rtems_ftpd_configuration.access;
|
||||
|
||||
ftpd_root = "/";
|
||||
if ( rtems_ftpd_configuration.root &&
|
||||
rtems_ftpd_configuration.root[0] == '/' )
|
||||
ftpd_root = rtems_ftpd_configuration.root;
|
||||
|
||||
rtems_ftpd_configuration.root = ftpd_root;
|
||||
|
||||
if (rtems_ftpd_configuration.tasks_count <= 0)
|
||||
rtems_ftpd_configuration.tasks_count = 1;
|
||||
count = rtems_ftpd_configuration.tasks_count;
|
||||
@@ -2100,15 +2107,6 @@ rtems_initialize_ftpd(void)
|
||||
return RTEMS_UNSATISFIED;
|
||||
}
|
||||
|
||||
ftpd_root = "/";
|
||||
if (
|
||||
rtems_ftpd_configuration.root &&
|
||||
rtems_ftpd_configuration.root[0] == '/'
|
||||
)
|
||||
ftpd_root = rtems_ftpd_configuration.root;
|
||||
|
||||
rtems_ftpd_configuration.root = ftpd_root;
|
||||
|
||||
syslog(LOG_INFO, "ftpd: FTP daemon started (%d session%s max)",
|
||||
count, ((count > 1) ? "s" : ""));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user