X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Frelayd%2Frelayd.cpp;h=28cab7bc5c8d0500f8615e071d1eac758ca1896c;hb=c9e313bc594f40a86eed237dce222c0fc99c957f;hp=5ca919f23c517ace58b8de3cf59f126a6766a4d9;hpb=55caead7396fa6d4337db7fa8c64a1036393be9f;p=lttng-tools.git diff --git a/src/common/relayd/relayd.cpp b/src/common/relayd/relayd.cpp index 5ca919f23..28cab7bc5 100644 --- a/src/common/relayd/relayd.cpp +++ b/src/common/relayd/relayd.cpp @@ -12,16 +12,16 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include -#include "relayd.h" +#include "relayd.hpp" static bool relayd_supports_chunks(const struct lttcomm_relayd_sock *sock) @@ -86,11 +86,13 @@ 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); + DBG3("Relayd sending command %s of size %" PRIu64, + lttcomm_relayd_command_str(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); + PERROR("Failed to send command %s of size %" PRIu64, + lttcomm_relayd_command_str(cmd), buf_size); + ret = rsock->sock.ops->sendmsg(&rsock->sock, buf, buf_size, flags); ret = -errno; goto error; }