Fix: relayd send_command() util not logging on failure
[lttng-tools.git] / src / common / relayd / relayd.c
index c3ad597ed8eb50d69dd9a57e65399a996ff423b3..7e6520d29f51d3c9f8dbd4781d9383fa4fbbb829 100644 (file)
@@ -72,14 +72,14 @@ static int send_command(struct lttcomm_relayd_sock *rsock,
                memcpy(buf + sizeof(header), data, size);
        }
 
+       DBG3("Relayd sending command %d of size %" PRIu64, (int) cmd, buf_size);
        ret = rsock->sock.ops->sendmsg(&rsock->sock, buf, buf_size, flags);
        if (ret < 0) {
+               PERROR("Failed to send command %d of size %" PRIu64,
+                               (int) cmd, buf_size);
                ret = -errno;
                goto error;
        }
-
-       DBG3("Relayd sending command %d of size %" PRIu64, cmd, buf_size);
-
 error:
        free(buf);
 alloc_error:
This page took 0.024817 seconds and 5 git commands to generate.