From: Russell Bryant Date: Mon, 8 Aug 2005 18:15:32 +0000 (+0000) Subject: terminate 'send text' with a newline (bug #4632) X-Git-Tag: 1.0.11.1~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83ef83a5f8cf6852a6454035d410ec17386011e2;p=thirdparty%2Fasterisk.git terminate 'send text' with a newline (bug #4632) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6310 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c index 481837949d..7d3b89bd77 100755 --- a/channels/chan_alsa.c +++ b/channels/chan_alsa.c @@ -873,6 +873,7 @@ static int console_sendtext(int fd, int argc, char *argv[]) strncat(text2send, argv[tmparg++], sizeof(text2send) - strlen(text2send) - 1); strncat(text2send, " ", sizeof(text2send) - strlen(text2send) - 1); } + text2send[strlen(text2send) - 1] = '\n'; f.data = text2send; f.datalen = strlen(text2send) + 1; grab_owner(); diff --git a/channels/chan_oss.c b/channels/chan_oss.c index dbfe53f617..10e4359694 100755 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -855,6 +855,7 @@ static int console_sendtext(int fd, int argc, char *argv[]) strncat(text2send, " ", sizeof(text2send) - strlen(text2send) - 1); } if (strlen(text2send)) { + text2send[strlen(text2send) - 1] = '\n'; f.frametype = AST_FRAME_TEXT; f.subclass = 0; f.data = text2send;