[rtems commit] PR 1998/networking - Move ftpd root initialization

Joel Sherrill joel at rtems.org
Thu Feb 2 20:10:32 UTC 2012


Module:    rtems
Branch:    master
Commit:    796bb3f51cc2a1f7789a337107ae1edfc107d7f5
Changeset: http://git.rtems.org/rtems/commit/?id=796bb3f51cc2a1f7789a337107ae1edfc107d7f5

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Thu Feb  2 13:33:09 2012 -0600

PR 1998/networking - Move ftpd root initialization

From: Xiangfu <xiangfu at sharism.cc>
Signed-off-by: Xiangfu <xiangfu at sharism.cc>

---

 cpukit/ftpd/ftpd.c |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c
index bcb55f3..8ac2bf3 100644
--- a/cpukit/ftpd/ftpd.c
+++ b/cpukit/ftpd/ftpd.c
@@ -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" : ""));
 




More information about the vc mailing list