[Asterisk-cvs] asterisk asterisk.c,1.17,1.18

markster at lists.digium.com markster at lists.digium.com
Wed Sep 3 22:54:35 CDT 2003


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv4473

Modified Files:
	asterisk.c 
Log Message:
Better handling of quit/exit (bug #218)


Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** asterisk.c	21 Aug 2003 02:34:03 -0000	1.17
--- asterisk.c	4 Sep 2003 03:55:41 -0000	1.18
***************
*** 580,592 ****
  			ret = 1;
  		}
! 		if (!strcasecmp(s, "help")) {
  			fprintf(stdout, "          !<command>   Executes a given shell command\n");
  			ret = 0;
  		}
! 		if (!strcasecmp(s, "quit")) {
! 			quit_handler(0, 0, 0, 0);
! 			ret = 1;
! 		}
! 		if (!strcasecmp(s, "exit")) {
  			quit_handler(0, 0, 0, 0);
  			ret = 1;
--- 580,589 ----
  			ret = 1;
  		}
! 		if (strncasecmp(s, "help", 4) == 0 && (s[4] == '\0' || isspace(s[4]))) {
  			fprintf(stdout, "          !<command>   Executes a given shell command\n");
  			ret = 0;
  		}
! 		if ((strncasecmp(s, "quit", 4) == 0 || strncasecmp(s, "exit", 4) == 0) &&
! 		    (s[4] == '\0' || isspace(s[4]))) {
  			quit_handler(0, 0, 0, 0);
  			ret = 1;
***************
*** 890,894 ****
  	LineInfo *lf = (LineInfo *)el_line(el);
  
! 	*lf->cursor = '\0';
  	ptr = (char *)lf->cursor;
  	if (ptr) {
--- 887,891 ----
  	LineInfo *lf = (LineInfo *)el_line(el);
  
! 	*(char *)lf->cursor = '\0';
  	ptr = (char *)lf->cursor;
  	if (ptr) {




More information about the svn-commits mailing list