diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-21 18:44:07 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-21 18:44:07 +0000 |
commit | 9ceb2bf9dcc311d8f575d98803dc33d83ab6b43d (patch) | |
tree | dc7363690c41f7d3691e06f7e78ab4980f7cb3ee /main/asterisk.c | |
parent | 0c65ea44da81028ee1b225e72b18778b7dd093f8 (diff) |
Merged revisions 117520 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r117520 | tilghman | 2008-05-21 13:43:26 -0500 (Wed, 21 May 2008) | 11 lines
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: http://svn.digium.com/svn/asterisk/branches/1.6.0@117522 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/asterisk.c')
-rw-r--r-- | main/asterisk.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index d3b44e1c4..ad1179c55 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -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)); |