[asterisk-commits] russell: branch 1.2 r71358 - /branches/1.2/asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jun 24 15:04:22 CDT 2007


Author: russell
Date: Sun Jun 24 15:04:21 2007
New Revision: 71358

URL: http://svn.digium.com/view/asterisk?view=rev&rev=71358
Log:
Revert the patch from issue 9654 due to an unexpected side effect

Modified:
    branches/1.2/asterisk.c

Modified: branches/1.2/asterisk.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/asterisk.c?view=diff&rev=71358&r1=71357&r2=71358
==============================================================================
--- branches/1.2/asterisk.c (original)
+++ branches/1.2/asterisk.c Sun Jun 24 15:04:21 2007
@@ -1816,9 +1816,6 @@
 	for(;;) {
 		ebuf = (char *)el_gets(el, &num);
 
-		if (!ebuf)
-			break;
-
 		if (!ast_strlen_zero(ebuf)) {
 			if (ebuf[strlen(ebuf)-1] == '\n')
 				ebuf[strlen(ebuf)-1] = '\0';
@@ -2460,15 +2457,12 @@
 
 		for (;;) {
 			buf = (char *)el_gets(el, &num);
-
-			if (!buf)
-				break;
-
-			if (buf[strlen(buf)-1] == '\n')
-				buf[strlen(buf)-1] = '\0';
-
-			consolehandler((char *)buf);
-			if (!buf && option_remote) {
+			if (buf) {
+				if (buf[strlen(buf)-1] == '\n')
+					buf[strlen(buf)-1] = '\0';
+
+				consolehandler((char *)buf);
+			} else if (option_remote) {
 				if (write(STDOUT_FILENO, "\nUse EXIT or QUIT to exit the asterisk console\n",
 					  strlen("\nUse EXIT or QUIT to exit the asterisk console\n")) < 0) {
 					/* Whoa, stdout disappeared from under us... Make /dev/null's */




More information about the asterisk-commits mailing list