diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-21 18:52:07 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-21 18:52:07 +0000 |
commit | 6d57244d5a46923a65b904e43e298f548eda1ea2 (patch) | |
tree | bfe95ffa454edf552aa508d673ca491490d23b66 | |
parent | 9cf017b2ba04f28bcaa76421280b51053ac17746 (diff) |
merge main/asterisk.c portion of 117519
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.4.20.1@117528 f38db490-d61c-443f-a65b-d21fe96a405b
-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 ef6c64de6..e11ee2658 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -2347,6 +2347,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)); |