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)
commit159c7ff4ea99cd808f89787f66a23152483137d4
tree9cb248fc192d72b0498069e2c6d6fa5edcf63cb5
parent3301e7404d026657c2e466bcdf504b93ddbe58e3
Fix sending fd through sendmsg/recvmsg ancillary data

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>
liblttkconsumerd/liblttkconsumerd.c
liblttsessiondcomm/liblttsessiondcomm.c
This page took 0.035916 seconds and 4 git commands to generate.