From: Mathieu Desnoyers Date: Mon, 26 Sep 2011 17:56:04 +0000 (-0400) Subject: Fix cmsg handling X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=aca7316ca85b225ec456b248041fe31074507aed;p=ust.git Fix cmsg handling Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/ust-basic-tracing/ust-basic-tracing.c b/tests/ust-basic-tracing/ust-basic-tracing.c index 583179c..8e0847f 100644 --- a/tests/ust-basic-tracing/ust-basic-tracing.c +++ b/tests/ust-basic-tracing/ust-basic-tracing.c @@ -195,7 +195,7 @@ static int lttcomm_recv_fd(int sock) } /* this is our fd */ for (i = 0; i < sizeof(int); i++) - tmp.vc[i] = CMSG_DATA(cmsg)[0]; + tmp.vc[i] = CMSG_DATA(cmsg)[i]; ret = tmp.vi; printf("received fd %d\n", ret); end: diff --git a/tests/ust-multi-test/ust-multi-test.c b/tests/ust-multi-test/ust-multi-test.c index c4b4f21..87352c1 100644 --- a/tests/ust-multi-test/ust-multi-test.c +++ b/tests/ust-multi-test/ust-multi-test.c @@ -203,7 +203,7 @@ static int lttcomm_recv_fd(int sock) } /* this is our fd */ for (i = 0; i < sizeof(int); i++) - tmp.vc[i] = CMSG_DATA(cmsg)[0]; + tmp.vc[i] = CMSG_DATA(cmsg)[i]; ret = tmp.vi; printf("received fd %d\n", ret); end: