Fix list field: handle error
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 31 May 2012 20:13:08 +0000 (16:13 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 1 Jun 2012 17:35:22 +0000 (13:35 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-ctl/ustctl.c

index b0b5b6cc94f2997c61def90e6e30b804295abaaf..9789413f2a4ce8c1b3737e4a43157a2a1aa68b8b 100644 (file)
@@ -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;
This page took 0.025946 seconds and 4 git commands to generate.