diff options
author | Russell Bryant <russell@russellbryant.com> | 2007-06-24 20:07:15 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2007-06-24 20:07:15 +0000 |
commit | 8f2d952945ddc783e2c55132f43f515424f91658 (patch) | |
tree | bf9bfdfbbef8f59b72f964b99351b629851f3292 /main | |
parent | 80166c6de81bc173a7abb74e9a9d1c83f45badaa (diff) |
Merged revisions 71362 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r71362 | russell | 2007-06-24 15:06:31 -0500 (Sun, 24 Jun 2007) | 10 lines
Merged revisions 71358 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r71358 | russell | 2007-06-24 15:04:21 -0500 (Sun, 24 Jun 2007) | 2 lines
Revert the patch from issue 9654 due to an unexpected side effect
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/asterisk.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 3088c5914..2e81f3d91 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -2232,9 +2232,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'; @@ -2960,14 +2957,12 @@ int main(int argc, char *argv[]) for (;;) { buf = (char *)el_gets(el, &num); - if (!buf) - break; - - if (buf[strlen(buf)-1] == '\n') - buf[strlen(buf)-1] = '\0'; - consolehandler((char *)buf); + if (buf) { + if (buf[strlen(buf)-1] == '\n') + buf[strlen(buf)-1] = '\0'; - if (!buf && ast_opt_remote && (write(STDOUT_FILENO, "\nUse EXIT or QUIT to exit the asterisk console\n", + consolehandler((char *)buf); + } 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; |