Revision 4bed9837 vl.c
b/vl.c | ||
---|---|---|
2836 | 2836 |
if (ret > 0) { |
2837 | 2837 |
IOHandlerRecord *pioh; |
2838 | 2838 |
|
2839 |
QLIST_FOREACH(ioh, &io_handlers, next) { |
|
2840 |
if (!ioh->deleted && ioh->fd_read && FD_ISSET(ioh->fd, &rfds)) { |
|
2841 |
ioh->fd_read(ioh->opaque); |
|
2842 |
} |
|
2843 |
if (!ioh->deleted && ioh->fd_write && FD_ISSET(ioh->fd, &wfds)) { |
|
2844 |
ioh->fd_write(ioh->opaque); |
|
2845 |
} |
|
2846 |
} |
|
2847 |
|
|
2848 |
/* remove deleted IO handlers */ |
|
2849 | 2839 |
QLIST_FOREACH_SAFE(ioh, &io_handlers, next, pioh) { |
2850 | 2840 |
if (ioh->deleted) { |
2851 | 2841 |
QLIST_REMOVE(ioh, next); |
2852 | 2842 |
qemu_free(ioh); |
2843 |
continue; |
|
2844 |
} |
|
2845 |
if (ioh->fd_read && FD_ISSET(ioh->fd, &rfds)) { |
|
2846 |
ioh->fd_read(ioh->opaque); |
|
2847 |
} |
|
2848 |
if (ioh->fd_write && FD_ISSET(ioh->fd, &wfds)) { |
|
2849 |
ioh->fd_write(ioh->opaque); |
|
2853 | 2850 |
} |
2854 | 2851 |
} |
2855 | 2852 |
} |
Also available in: Unified diff