Fix: implicit conversion of enum types in consumer
[lttng-tools.git] / src / bin / lttng-sessiond / consumer.c
index f0870e6b0c0abcf2ae50e83c32df5ef2b162a33e..18931a8b7b8d488ab437522889894049b5f8f20b 100644 (file)
@@ -31,7 +31,7 @@
 #include <common/relayd/relayd.h>
 
 #include "consumer.h"
-#include "health.h"
+#include "health-sessiond.h"
 #include "ust-app.h"
 #include "utils.h"
 
@@ -142,7 +142,7 @@ int consumer_recv_status_reply(struct consumer_socket *sock)
                goto end;
        }
 
-       if (reply.ret_code == LTTNG_OK) {
+       if (reply.ret_code == LTTCOMM_CONSUMERD_SUCCESS) {
                /* All good. */
                ret = 0;
        } else {
@@ -178,13 +178,14 @@ int consumer_recv_status_channel(struct consumer_socket *sock,
        }
 
        /* An error is possible so don't touch the key and stream_count. */
-       if (reply.ret_code != LTTNG_OK) {
+       if (reply.ret_code != LTTCOMM_CONSUMERD_SUCCESS) {
                ret = -1;
                goto end;
        }
 
        *key = reply.key;
        *stream_count = reply.stream_count;
+       ret = 0;
 
 end:
        return ret;
@@ -960,7 +961,8 @@ int consumer_send_relayd_socket(struct consumer_socket *consumer_sock,
        if (type == LTTNG_STREAM_CONTROL) {
                ret = relayd_create_session(rsock,
                                &msg.u.relayd_sock.relayd_session_id,
-                               session_name, hostname, session_live_timer);
+                               session_name, hostname, session_live_timer,
+                               consumer->snapshot);
                if (ret < 0) {
                        /* Close the control socket. */
                        (void) relayd_close(rsock);
This page took 0.023912 seconds and 4 git commands to generate.