From: Mathieu Desnoyers Date: Thu, 31 May 2012 20:13:08 +0000 (-0400) Subject: Fix list field: handle error X-Git-Tag: v2.1.0-rc1~72 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=1f9ea73ccce16c5bc7e4eeb27db21b7bf62c9823;p=lttng-ust.git Fix list field: handle error Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index b0b5b6cc..9789413f 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -520,6 +520,10 @@ int ustctl_tracepoint_field_list_get(int sock, int tp_field_list_handle, ret = ustcomm_send_app_cmd(sock, &lum, &lur); if (ret) return ret; + if (lur.ret_code != USTCOMM_OK) { + DBG("Return code: %s", ustcomm_get_readable_code(lur.ret_code)); + return -EINVAL; + } len = ustcomm_recv_unix_sock(sock, iter, sizeof(*iter)); if (len != sizeof(*iter)) { return -EINVAL;