From: Mark Spencer Date: Mon, 26 Apr 2004 12:51:49 +0000 (+0000) Subject: Move skinny to support poll X-Git-Tag: 1.0.0-rc1~664 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=add7cf7ded2222e53d064000611dcc5dbe80bd5d;p=thirdparty%2Fasterisk.git Move skinny to support poll git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2777 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index e473f230a9..5f7b61b029 100755 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -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));