aboutsummaryrefslogtreecommitdiffstats
path: root/asterisk.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-12-03 04:55:55 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-12-03 04:55:55 +0000
commitd30c7b7b9ee47f7bd515741818611b8d4b634c51 (patch)
tree67ac3342c3a95f58468a8f22cb60850642552fd3 /asterisk.c
parent523ea7529cdfb4d20e3a2ade2db54f23d71fd479 (diff)
Revert bad patch in 187
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1819 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rwxr-xr-xasterisk.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/asterisk.c b/asterisk.c
index 57724f897..37efe8029 100755
--- a/asterisk.c
+++ b/asterisk.c
@@ -167,7 +167,6 @@ static void *netconsole(void *vconsole)
int res;
int max;
fd_set rfds;
- struct timeval tv;
if (gethostname(hostname, sizeof(hostname)))
strncpy(hostname, "<Unknown>", sizeof(hostname)-1);
@@ -180,17 +179,11 @@ static void *netconsole(void *vconsole)
max = con->fd;
if (con->p[0] > max)
max = con->p[0];
- tv.tv_sec = 4; /* Wait max 4 sec for fds to become active */
- tv.tv_usec = 0;
res = ast_select(max + 1, &rfds, NULL, NULL, NULL);
if (res < 0) {
ast_log(LOG_WARNING, "select returned < 0: %s\n", strerror(errno));
continue;
}
- if (res == 0) {
- ast_log(LOG_WARNING, "Timeout on select.\n");
- break;
- }
if (FD_ISSET(con->fd, &rfds)) {
res = read(con->fd, tmp, sizeof(tmp));
if (res < 1) {
@@ -801,7 +794,7 @@ static int ast_el_read_char(EditLine *el, char *cp)
if (!option_exec && !lastpos)
write(STDOUT_FILENO, "\r", 1);
write(STDOUT_FILENO, buf, res);
- if ((buf[res-1] == '\n') && (buf[res-2] == '\n')) {
+ if ((buf[res-1] == '\n') || (buf[res-2] == '\n')) {
*cp = CC_REFRESH;
return(1);
} else {