mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 06:48:25 +00:00
Only send 180 ringing once, fix CTRL+D in main code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
13
asterisk.c
13
asterisk.c
@@ -1373,12 +1373,15 @@ int main(int argc, char *argv[])
|
||||
ast_cli_register(&astexit);
|
||||
consolethread = pthread_self();
|
||||
|
||||
while ( (buf = (char *)el_gets(el, &num) ) != NULL && num != 0) {
|
||||
for (;;) {
|
||||
buf = (char *)el_gets(el, &num);
|
||||
if (buf) {
|
||||
if (buf[strlen(buf)-1] == '\n')
|
||||
buf[strlen(buf)-1] = '\0';
|
||||
|
||||
if (buf[strlen(buf)-1] == '\n')
|
||||
buf[strlen(buf)-1] = '\0';
|
||||
|
||||
consolehandler((char *)buf);
|
||||
consolehandler((char *)buf);
|
||||
} else
|
||||
ast_cli(STDOUT_FILENO, "\nUse EXIT or QUIT to exist, or STOP NOW to shutdown Asterisk\n");
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user