]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Strip terminal sequences from the verbose messages
authorRussell Bryant <russell@russellbryant.com>
Wed, 9 Jan 2008 23:01:48 +0000 (23:01 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 9 Jan 2008 23:01:48 +0000 (23:01 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97645 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx/pbx_gtkconsole.c

index a566040e72af77f406eb57fde359565143575148..4a4c3ba45ee0cd52928caddedf9935b68fb1385d 100644 (file)
@@ -52,6 +52,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/cli.h"
 #include "asterisk/utils.h"
 #include "asterisk/paths.h"
+#include "asterisk/term.h"
 
 AST_MUTEX_DEFINE_STATIC(verb_lock);
 
@@ -103,11 +104,16 @@ static int cleanup(void *useless)
 }
 
 
-static void __verboser(const char *stuff)
+static void __verboser(const char *_stuff)
 {
        char *s2[2];
        struct timeval tv;
        int ms;
+       char *stuff;
+
+       stuff = ast_strdupa(_stuff);
+       term_strip(stuff, stuff, strlen(stuff) + 1);
+
        s2[0] = (char *)stuff;
        s2[1] = NULL;
        gtk_clist_freeze(GTK_CLIST(verb));