From 71a6a16fd04f7b25e55b8c676596b9fa8c29a037 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 19 Oct 2010 07:38:53 +0000 Subject: [PATCH] 2010-10-19 Sebastian Huber * libnetworking/lib/ftpfs.c: Fixed a special case with no username and password. --- cpukit/ChangeLog | 5 +++++ cpukit/libnetworking/lib/ftpfs.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index ade0eb257d..57dfc69b9f 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2010-10-19 Sebastian Huber + + * libnetworking/lib/ftpfs.c: Fixed a special case with no username and + password. + 2010-10-19 Chris Johns * libfs/src/rfs/rtems-rfs-rtems-file.c: Add missing unlock in diff --git a/cpukit/libnetworking/lib/ftpfs.c b/cpukit/libnetworking/lib/ftpfs.c index 918d6de571..1b633aa94d 100644 --- a/cpukit/libnetworking/lib/ftpfs.c +++ b/cpukit/libnetworking/lib/ftpfs.c @@ -491,6 +491,13 @@ static bool rtems_ftpfs_split_names ( done: + /* This is a special case with no username and password */ + if (*hostname == NULL) { + *hostname = &s [0]; + *user = "anonymous"; + *password = *user; + } + /* If we have no password use the user name */ if (*password == NULL) { *password = *user;