nb_fd = size / sizeof(struct lttcomm_kconsumerd_msg);
/*
- * Note: only supporting receiving one FD at a time for now.
- * This code needs fixing if we wish to receive more (a single
- * receive for the whole fd batch rather than one per fd).
+ * nb_fd is the number of fds we receive. One fd per recvmsg.
*/
- assert(nb_fd == 1);
-
for (i = 0; i < nb_fd; i++) {
struct msghdr msg = { 0 };
*/
void kconsumerd_cleanup(void)
{
- struct kconsumerd_fd *iter;
+ struct kconsumerd_fd *iter, *tmp;
/* remove the socket file */
unlink(kconsumerd_command_sock_path);
* running (after joining on the threads), no need to protect
* list iteration with mutex.
*/
- cds_list_for_each_entry(iter, &kconsumerd_data.fd_list.head, list) {
+ cds_list_for_each_entry_safe(iter, tmp, &kconsumerd_data.fd_list.head, list) {
kconsumerd_del_fd(iter);
}
}