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:
parent
6b55f06a23
commit
add7cf7ded
1 changed files with 5 additions and 6 deletions
|
@ -2259,12 +2259,11 @@ static int get_input(struct skinnysession *s)
|
||||||
|
|
||||||
int res;
|
int res;
|
||||||
int dlen = 0;
|
int dlen = 0;
|
||||||
|
struct pollfd fds[1];
|
||||||
|
|
||||||
fd_set fds;
|
fds[0].fd = s->fd;
|
||||||
FD_ZERO(&fds);
|
fds[0].events = POLLIN;
|
||||||
FD_SET(s->fd, &fds);
|
res = poll(fds, 1, -1);
|
||||||
|
|
||||||
res = ast_select(s->fd + 1, &fds, NULL, NULL, NULL);
|
|
||||||
|
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
ast_log(LOG_WARNING, "Select returned error: %s\n", strerror(errno));
|
ast_log(LOG_WARNING, "Select returned error: %s\n", strerror(errno));
|
||||||
|
|
Loading…
Reference in a new issue