There are two conflicting comments for this function. One says it
returns the size of the received data and the other says it returns the
number of fd received.
It's more useful to receive the number of fd.
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I74084b461d396c3e623fa55100e6dd7e59dbea83
/*
* Recv a message accompanied by fd(s) from a unix socket.
*
- * Returns the size of received data, or negative error value.
- *
* Expect at most "nb_fd" file descriptors. Returns the number of fd
* actually received in nb_fd.
* Returns -EPIPE on orderly shutdown.
goto end;
}
memcpy(fds, CMSG_DATA(cmsg), sizeof_fds);
- ret = sizeof_fds;
+ ret = nb_fd;
end:
return ret;
}