mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 19:08:14 +00:00
Revert the patch from issue 9654 due to an unexpected side effect
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
16
asterisk.c
16
asterisk.c
@@ -1816,9 +1816,6 @@ static void ast_remotecontrol(char * data)
|
|||||||
for(;;) {
|
for(;;) {
|
||||||
ebuf = (char *)el_gets(el, &num);
|
ebuf = (char *)el_gets(el, &num);
|
||||||
|
|
||||||
if (!ebuf)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (!ast_strlen_zero(ebuf)) {
|
if (!ast_strlen_zero(ebuf)) {
|
||||||
if (ebuf[strlen(ebuf)-1] == '\n')
|
if (ebuf[strlen(ebuf)-1] == '\n')
|
||||||
ebuf[strlen(ebuf)-1] = '\0';
|
ebuf[strlen(ebuf)-1] = '\0';
|
||||||
@@ -2460,15 +2457,12 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
buf = (char *)el_gets(el, &num);
|
buf = (char *)el_gets(el, &num);
|
||||||
|
if (buf) {
|
||||||
|
if (buf[strlen(buf)-1] == '\n')
|
||||||
|
buf[strlen(buf)-1] = '\0';
|
||||||
|
|
||||||
if (!buf)
|
consolehandler((char *)buf);
|
||||||
break;
|
} else if (option_remote) {
|
||||||
|
|
||||||
if (buf[strlen(buf)-1] == '\n')
|
|
||||||
buf[strlen(buf)-1] = '\0';
|
|
||||||
|
|
||||||
consolehandler((char *)buf);
|
|
||||||
if (!buf && option_remote) {
|
|
||||||
if (write(STDOUT_FILENO, "\nUse EXIT or QUIT to exit the asterisk console\n",
|
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) {
|
strlen("\nUse EXIT or QUIT to exit the asterisk console\n")) < 0) {
|
||||||
/* Whoa, stdout disappeared from under us... Make /dev/null's */
|
/* Whoa, stdout disappeared from under us... Make /dev/null's */
|
||||||
|
|||||||
Reference in New Issue
Block a user