mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user