Use the _safe variant as a bsc_unregister_fd might be called from within the callback

This commit is contained in:
Holger Freyther 2009-01-02 21:53:34 +00:00
parent b21b305d7c
commit c6880a46ad
1 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ void bsc_unregister_fd(struct bsc_fd *fd)
int bsc_select_main()
{
struct bsc_fd *ufd;
struct bsc_fd *ufd, *tmp;
fd_set readset, writeset, exceptset;
int i;
@ -84,7 +84,7 @@ int bsc_select_main()
update_timers();
/* call registered callback functions */
llist_for_each_entry(ufd, &bsc_fds, list) {
llist_for_each_entry_safe(ufd, tmp, &bsc_fds, list) {
int flags = 0;
if (FD_ISSET(ufd->fd, &readset))