summaryrefslogtreecommitdiff
path: root/cpukit/ftpd/ftpd.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2011-06-07 09:08:37 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2011-06-07 09:08:37 +0000
commit1343dfa3140003f7b8250559485fc072238fdc19 (patch)
treef282b5552fd4f5651e586a3708181d01e00a60df /cpukit/ftpd/ftpd.c
parent68e60ddbff2397311d7b59a10c0c2ac5a2eff97a (diff)
2011-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1811/networking * ftpd/ftpd.c: Fixed reply format.
Diffstat (limited to 'cpukit/ftpd/ftpd.c')
-rw-r--r--cpukit/ftpd/ftpd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c
index b0f22c480c..04b2612420 100644
--- a/cpukit/ftpd/ftpd.c
+++ b/cpukit/ftpd/ftpd.c
@@ -552,12 +552,8 @@ task_pool_release(FTPD_SessionInfo_t* info)
static void
send_reply(FTPD_SessionInfo_t *info, int code, char *text)
{
- char const* s = (info->xfer_mode == TYPE_A) ? "\r" : "";
- /* If a text reply exists, add it to the reply data. */
- if (text != NULL)
- fprintf(info->ctrl_fp, "%d %.70s%s\n", code, text, s);
- else
- fprintf(info->ctrl_fp, "%d%s\n", code, s);
+ text = text != NULL ? text : "";
+ fprintf(info->ctrl_fp, "%d %.70s\r\n", code, text);
fflush(info->ctrl_fp);
}