Support flight recorder mode for a session
[lttng-tools.git] / src / common / ust-consumer / ust-consumer.c
index f783d4058c550033983045c93cbeddcc363028d3..f24b5fa3e2587039a57e4fca3eef192bc80ed6c3 100644 (file)
@@ -114,13 +114,14 @@ error:
 static struct lttng_consumer_channel *allocate_channel(uint64_t session_id,
                const char *pathname, const char *name, uid_t uid, gid_t gid,
                int relayd_id, uint64_t key, enum lttng_event_output output,
-               uint64_t tracefile_size, uint64_t tracefile_count)
+               uint64_t tracefile_size, uint64_t tracefile_count,
+               unsigned int monitor)
 {
        assert(pathname);
        assert(name);
 
        return consumer_allocate_channel(key, session_id, pathname, name, uid, gid,
-                       relayd_id, output, tracefile_size, tracefile_count);
+                       relayd_id, output, tracefile_size, tracefile_count, monitor);
 }
 
 /*
@@ -924,7 +925,8 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
                                msg.u.ask_channel.relayd_id, msg.u.ask_channel.key,
                                (enum lttng_event_output) msg.u.ask_channel.output,
                                msg.u.ask_channel.tracefile_size,
-                               msg.u.ask_channel.tracefile_count);
+                               msg.u.ask_channel.tracefile_count,
+                               msg.u.ask_channel.monitor);
                if (!channel) {
                        goto end_channel_error;
                }
@@ -1146,6 +1148,15 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
                }
                goto end_msg_sessiond;
        }
+       case LTTNG_CONSUMER_SNAPSHOT_CHANNEL:
+       {
+               ret = consumer_send_status_msg(sock, ret_code);
+               if (ret < 0) {
+                       /* Somehow, the session daemon is not responding anymore. */
+                       goto end_nosignal;
+               }
+               break;
+       }
        default:
                break;
        }
This page took 0.024544 seconds and 4 git commands to generate.