[asterisk-commits] russell: trunk r43715 - in /trunk: ./
main/asterisk.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Sep 26 14:01:03 MST 2006
Author: russell
Date: Tue Sep 26 16:01:02 2006
New Revision: 43715
URL: http://svn.digium.com/view/asterisk?rev=43715&view=rev
Log:
Merged revisions 43710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r43710 | russell | 2006-09-26 16:56:42 -0400 (Tue, 26 Sep 2006) | 17 lines
(This was actually BE-65)
Merged revisions 43708 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r43708 | russell | 2006-09-26 16:49:21 -0400 (Tue, 26 Sep 2006) | 7 lines
Back in revision 4798, this message was changed from using ast_cli() to directly
calling write(). During this change, checking if this was a remote console was
removed. This caused this message about using "exit" or "quit" to exit an
Asterisk console to come up in times where it did not make sense. This change
restores the check to see if this is a remote console before printing the
message. (fixes BE-4)
........
................
Modified:
trunk/ (props changed)
trunk/main/asterisk.c
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Tue Sep 26 16:01:02 2006
@@ -1,1 +1,1 @@
-/branches/1.4:1-43376,43383,43386,43388,43392,43396,43405,43410,43422,43441,43445,43450,43454,43456,43464,43466,43469,43477,43482,43486,43489,43492,43518,43524,43553,43564,43616,43640,43642,43650,43674,43676,43695,43697,43700,43707
+/branches/1.4:1-43376,43383,43386,43388,43392,43396,43405,43410,43422,43441,43445,43450,43454,43456,43464,43466,43469,43477,43482,43486,43489,43492,43518,43524,43553,43564,43616,43640,43642,43650,43674,43676,43695,43697,43700,43707,43710
Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?rev=43715&r1=43714&r2=43715&view=diff
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Tue Sep 26 16:01:02 2006
@@ -2753,19 +2753,17 @@
buf[strlen(buf)-1] = '\0';
consolehandler((char *)buf);
- } else {
- 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 */
- int fd;
- fd = open("/dev/null", O_RDWR);
- if (fd > -1) {
- dup2(fd, STDOUT_FILENO);
- dup2(fd, STDIN_FILENO);
- } else
- ast_log(LOG_WARNING, "Failed to open /dev/null to recover from dead console. Bad things will happen!\n");
- break;
- }
+ } else if (ast_opt_remote && (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 */
+ int fd;
+ fd = open("/dev/null", O_RDWR);
+ if (fd > -1) {
+ dup2(fd, STDOUT_FILENO);
+ dup2(fd, STDIN_FILENO);
+ } else
+ ast_log(LOG_WARNING, "Failed to open /dev/null to recover from dead console. Bad things will happen!\n");
+ break;
}
}
More information about the asterisk-commits
mailing list