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
1.0
Russell Bryant 20 years ago
parent 2595998b8f
commit 83ef83a5f8

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

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

Loading…
Cancel
Save