Move skinny to support poll

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer 2004-04-26 12:51:49 +00:00
parent 6b55f06a23
commit add7cf7ded
1 changed files with 5 additions and 6 deletions

View File

@ -2258,13 +2258,12 @@ static int get_input(struct skinnysession *s)
{
int res;
int dlen = 0;
int dlen = 0;
struct pollfd fds[1];
fd_set fds;
FD_ZERO(&fds);
FD_SET(s->fd, &fds);
res = ast_select(s->fd + 1, &fds, NULL, NULL, NULL);
fds[0].fd = s->fd;
fds[0].events = POLLIN;
res = poll(fds, 1, -1);
if (res < 0) {
ast_log(LOG_WARNING, "Select returned error: %s\n", strerror(errno));