mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 16:20:37 +00:00
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:
1
io.c
1
io.c
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user