]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Back in revision 4798, this message was changed from using ast_cli() to directly
authorRussell Bryant <russell@russellbryant.com>
Tue, 26 Sep 2006 20:49:21 +0000 (20:49 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 26 Sep 2006 20:49:21 +0000 (20:49 +0000)
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)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43708 65c4cc65-6c06-0410-ace0-fbb531ad65f3

asterisk.c

index a5f07a2b223fbc24f63e2a3c3be1287206755b04..9cfdc565d58e597b25de2bfaa56b9595f7ef3da5 100644 (file)
@@ -2417,7 +2417,7 @@ int main(int argc, char *argv[])
                                        buf[strlen(buf)-1] = '\0';
 
                                consolehandler((char *)buf);
-                       } else {
+                       } 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 */