Rename C++ header files to .hpp
[lttng-tools.git] / src / common / relayd / relayd.cpp
index 5ca919f23c517ace58b8de3cf59f126a6766a4d9..28cab7bc5c8d0500f8615e071d1eac758ca1896c 100644 (file)
 #include <sys/stat.h>
 #include <inttypes.h>
 
-#include <common/common.h>
-#include <common/defaults.h>
-#include <common/compat/endian.h>
-#include <common/compat/string.h>
-#include <common/sessiond-comm/relayd.h>
-#include <common/index/ctf-index.h>
-#include <common/trace-chunk.h>
-#include <common/string-utils/format.h>
+#include <common/common.hpp>
+#include <common/defaults.hpp>
+#include <common/compat/endian.hpp>
+#include <common/compat/string.hpp>
+#include <common/sessiond-comm/relayd.hpp>
+#include <common/index/ctf-index.hpp>
+#include <common/trace-chunk.hpp>
+#include <common/string-utils/format.hpp>
 
-#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;
        }
This page took 0.026379 seconds and 4 git commands to generate.