Fix sending fd through sendmsg/recvmsg ancillary data
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 21 Jul 2011 18:16:05 +0000 (14:16 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 21 Jul 2011 18:16:05 +0000 (14:16 -0400)
ltt-kconsumerd was only reading a "char" rather than an integer. It
worked fine on little endian for values below 256, and failed on big
endian machines (always reading "0").

Also cleanup msg initialization.
Also perform final msg.msg_controllen = cmsg->cmsg_len; after memcpy, as
done in cmsg(3) example (extra safety).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

No differences found
This page took 0.025046 seconds and 4 git commands to generate.