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
This commit is contained in:
Russell Bryant
2005-08-08 18:15:32 +00:00
parent 2595998b8f
commit 83ef83a5f8
2 changed files with 2 additions and 0 deletions

View File

@@ -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();

View File

@@ -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;