Skip to content
Snippets Groups Projects
Commit 7a2413e9 authored by Tilghman Lesher's avatar Tilghman Lesher
Browse files

Merged revisions 117519 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r117519 | tilghman | 2008-05-21 13:40:14 -0500 (Wed, 21 May 2008) | 3 lines

Strip the preamble from the output also when -rx is not being used
(Related to issue #12702)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 06a7b4ea
No related branches found
No related tags found
No related merge requests found
......@@ -2480,6 +2480,14 @@ static void ast_remotecontrol(char * data)
if (ebuf[strlen(ebuf)-1] == '\n')
ebuf[strlen(ebuf)-1] = '\0';
if (!remoteconsolehandler(ebuf)) {
/* Strip preamble from output */
char *tmp;
for (tmp = ebuf; *tmp; tmp++) {
if (*tmp == 127) {
memmove(tmp, tmp + 1, strlen(tmp));
tmp--;
}
}
res = write(ast_consock, ebuf, strlen(ebuf) + 1);
if (res < 1) {
ast_log(LOG_WARNING, "Unable to write: %s\n", strerror(errno));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment