From ab6d6498fe7699c214438bbfd2cbd34cda03fd7b Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Thu, 16 Jul 2015 17:55:26 +0200
Subject: [PATCH] Added missing charset abstraction.
---
apps/telnetd/telnetd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/apps/telnetd/telnetd.c b/apps/telnetd/telnetd.c
index 37c3fd6cc..7b211f121 100644
--- a/apps/telnetd/telnetd.c
+++ b/apps/telnetd/telnetd.c
@@ -173,6 +173,8 @@ shell_prompt(char *str)
void
shell_default_output(const char *str1, int len1, const char *str2, int len2)
{
+ static const char crnl[2] = {ISO_cr, ISO_nl};
+
if(len1 > 0 && str1[len1 - 1] == '\n') {
--len1;
}
@@ -187,7 +189,7 @@ shell_default_output(const char *str1, int len1, const char *str2, int len2)
#endif /* TELNETD_CONF_GUI */
buf_append(&buf, str1, len1);
buf_append(&buf, str2, len2);
- buf_append(&buf, "\r\n", 2);
+ buf_append(&buf, crnl, sizeof(crnl));
}
/*---------------------------------------------------------------------------*/
void