[Asterisk-cvs] asterisk asterisk.c,1.110,1.111
markster at lists.digium.com
markster at lists.digium.com
Sun Aug 1 14:26:49 CDT 2004
Update of /usr/cvsroot/asterisk
In directory localhost.localdomain:/tmp/cvs-serv25869
Modified Files:
asterisk.c
Log Message:
Don't record empty lines (bug #2175, but not using proposed patch)
Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- asterisk.c 31 Jul 2004 20:25:07 -0000 1.110
+++ asterisk.c 1 Aug 2004 18:12:52 -0000 1.111
@@ -654,12 +654,22 @@
pthread_kill(consolethread, SIGURG);
}
+static int ast_all_zeros(char *s)
+{
+ while(*s) {
+ if (*s > 32)
+ return 0;
+ s++;
+ }
+ return 1;
+}
+
static void consolehandler(char *s)
{
printf(term_end());
fflush(stdout);
/* Called when readline data is available */
- if (s && !ast_strlen_zero(s))
+ if (s && !ast_all_zeros(s))
ast_el_add_history(s);
/* Give the console access to the shell */
if (s) {
More information about the svn-commits
mailing list