Backported to glibc 2.8
[lttng-tools.git] / src / bin / lttng-relayd / cmd-2-4.c
index 45410e4e81ad912c8e7f45107ff59e50e6635f31..6d927a05341a2ed503ec473cd75c4a463828c9eb 100644 (file)
 #include <common/common.h>
 #include <common/sessiond-comm/relayd.h>
 
+#include <common/compat/endian.h>
+
 #include "cmd-generic.h"
 #include "lttng-relayd.h"
 
-int cmd_create_session_2_4(struct relay_command *cmd,
+int cmd_create_session_2_4(struct relay_connection *conn,
                struct relay_session *session)
 {
        int ret;
        struct lttcomm_relayd_create_session_2_4 session_info;
 
-       assert(cmd);
+       assert(conn);
        assert(session);
 
-       ret = cmd_recv(cmd->sock, &session_info, sizeof(session_info));
+       ret = cmd_recv(conn->sock, &session_info, sizeof(session_info));
        if (ret < 0) {
                ERR("Unable to recv session info version 2.4");
                goto error;
@@ -46,6 +48,7 @@ int cmd_create_session_2_4(struct relay_command *cmd,
        strncpy(session->hostname, session_info.hostname,
                        sizeof(session->hostname));
        session->live_timer = be32toh(session_info.live_timer);
+       session->snapshot = be32toh(session_info.snapshot);
 
        ret = 0;
 
This page took 0.023758 seconds and 4 git commands to generate.