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:
Russell Bryant
2007-06-24 20:04:21 +00:00
parent f7a787c757
commit fb50a2da95

View File

@@ -1816,9 +1816,6 @@ static void ast_remotecontrol(char * data)
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 @@ int main(int argc, char *argv[])
for (;;) {
buf = (char *)el_gets(el, &num);
if (buf) {
if (buf[strlen(buf)-1] == '\n')
buf[strlen(buf)-1] = '\0';
if (!buf)
break;
if (buf[strlen(buf)-1] == '\n')
buf[strlen(buf)-1] = '\0';
consolehandler((char *)buf);
if (!buf && option_remote) {
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 */