[asterisk-commits] tilghman: branch 1.4 r163761 - in /branches/1.4/main: asterisk.c editline/read.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Dec 12 16:03:11 CST 2008
Author: tilghman
Date: Fri Dec 12 16:03:10 2008
New Revision: 163761
URL: http://svn.digium.com/view/asterisk?view=rev&rev=163761
Log:
Simple fix for Ctrl-C not immediately exiting Asterisk, but also add a
pointer inside editline to look back to asterisk.c, so others don't spend
as much time as I did looking (in the wrong place) for the appropriate
function.
Reported by: ZX81, via the #asterisk-users channel
Fixed by: me (license 14)
Modified:
branches/1.4/main/asterisk.c
branches/1.4/main/editline/read.c
Modified: branches/1.4/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/asterisk.c?view=diff&rev=163761&r1=163760&r2=163761
==============================================================================
--- branches/1.4/main/asterisk.c (original)
+++ branches/1.4/main/asterisk.c Fri Dec 12 16:03:10 2008
@@ -1777,6 +1777,8 @@
}
res = poll(fds, max, -1);
if (res < 0) {
+ if (sig_flags.need_quit)
+ break;
if (errno == EINTR)
continue;
ast_log(LOG_ERROR, "poll failed: %s\n", strerror(errno));
Modified: branches/1.4/main/editline/read.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/editline/read.c?view=diff&rev=163761&r1=163760&r2=163761
==============================================================================
--- branches/1.4/main/editline/read.c (original)
+++ branches/1.4/main/editline/read.c Fri Dec 12 16:03:10 2008
@@ -286,6 +286,8 @@
/* read_char():
* Read a character from the tty.
+ * XXX This routine is the default, but what you are actually looking for
+ * is in main/asterisk.c, in ast_el_read_char(). XXX
*/
private int
read_char(EditLine *el, char *cp)
@@ -344,6 +346,7 @@
#ifdef DEBUG_READ
(void) fprintf(el->el_errfile, "Reading a character\n");
#endif /* DEBUG_READ */
+ /* See main/asterisk.c: ast_el_read_char() */
num_read = (*el->el_read.read_char)(el, cp);
#ifdef DEBUG_READ
(void) fprintf(el->el_errfile, "Got it %c\n", *cp);
More information about the asterisk-commits
mailing list