From aca7316ca85b225ec456b248041fe31074507aed Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 26 Sep 2011 13:56:04 -0400 Subject: [PATCH] Fix cmsg handling Signed-off-by: Mathieu Desnoyers --- tests/ust-basic-tracing/ust-basic-tracing.c | 2 +- tests/ust-multi-test/ust-multi-test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ust-basic-tracing/ust-basic-tracing.c b/tests/ust-basic-tracing/ust-basic-tracing.c index 583179c1..8e0847fa 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 c4b4f212..87352c1d 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: -- 2.34.1