On (Thu) Jan 13 2011 [14:55:25], Gerd Hoffmann wrote: > On 01/13/11 14:00, Amit Shah wrote: > > { > >- return assign_fd_handlers(fd, fd_read_poll, fd_read, fd_write, opaque); > >+ assign_fd_handlers(fd, fd_read_poll, fd_read, fd_write, opaque); > >+ set_read_poll_fd_action(fd, true); > >+ set_read_fd_action(fd, true); > >+ set_write_fd_action(fd, true); > >+ return 0; > > } > > I'd suggest to move the *action calls into assign_fd_handlers() so > the handlers default to being enabled in all cases. This should > match what most users need and thus minimize the number of *_action > calls needed.
What may happen with that is the fd may get select()-ed for an operation that it didn't want to be put on the queue for. Amit