- case POLLERR:
- ERR("Error returned in polling fd %d.", pollfd[i].fd);
- num_hup++;
- send_error(KCONSUMERD_POLL_ERROR);
- break;
- case POLLHUP:
- ERR("Polling fd %d tells it has hung up.", pollfd[i].fd);
- num_hup++;
- break;
- case POLLNVAL:
- ERR("Polling fd %d tells fd is not open.", pollfd[i].fd);
- send_error(KCONSUMERD_POLL_NVAL);
- num_hup++;
- break;
- case POLLPRI:
- DBG("Urgent read on fd %d", pollfd[i].fd);
- high_prio = 1;
- ret = read_subbuffer(local_kconsumerd_fd[i]);
- /* it's ok to have an unavailable sub-buffer (FIXME : is it ?) */
- if (ret == EAGAIN) {
- ret = 0;
- }
- break;
+ case POLLERR:
+ ERR("Error returned in polling fd %d.", pollfd[i].fd);
+ del_fd(local_kconsumerd_fd[i]);
+ update_fd_array = 1;
+ num_hup++;
+ break;
+ case POLLHUP:
+ ERR("Polling fd %d tells it has hung up.", pollfd[i].fd);
+ del_fd(local_kconsumerd_fd[i]);
+ update_fd_array = 1;
+ num_hup++;
+ break;
+ case POLLNVAL:
+ ERR("Polling fd %d tells fd is not open.", pollfd[i].fd);
+ del_fd(local_kconsumerd_fd[i]);
+ update_fd_array = 1;
+ num_hup++;
+ break;
+ case POLLPRI:
+ DBG("Urgent read on fd %d", pollfd[i].fd);
+ high_prio = 1;
+ ret = read_subbuffer(local_kconsumerd_fd[i]);
+ /* it's ok to have an unavailable sub-buffer (FIXME : is it ?) */
+ if (ret == EAGAIN) {
+ ret = 0;
+ }
+ break;