ensure revents fields are initialized before calling poll()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-08-31 22:12:23 +00:00
parent b67fced7ae
commit 050d6c7d34
4 changed files with 9 additions and 0 deletions

1
io.c
View File

@@ -165,6 +165,7 @@ int *ast_io_add(struct io_context *ioc, int fd, ast_io_cb callback, short events
*/
ioc->fds[ioc->fdcnt].fd = fd;
ioc->fds[ioc->fdcnt].events = events;
ioc->fds[ioc->fdcnt].revents = 0;
ioc->ior[ioc->fdcnt].callback = callback;
ioc->ior[ioc->fdcnt].data = data;
ioc->ior[ioc->fdcnt].id = (int *)malloc(sizeof(int));