consumerd: Implement clear stream/session commands
[lttng-tools.git] / src / common / ust-consumer / ust-consumer.c
index 473c94b2313a3ee23ffd71b80a1e880827c9834c..87c121464e332656eafb27813c900acbdf8f3a26 100644 (file)
@@ -1948,6 +1948,25 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
                }
                break;
        }
+       case LTTNG_CONSUMER_CLEAR_SESSION:
+       {
+               uint64_t session_id = msg.u.clear_session.session_id;
+
+               ret = lttng_consumer_clear_session(session_id);
+               if (ret) {
+                       ERR("Clear session failed session_id %" PRIu64, session_id);
+                       ret_code = ret;
+               }
+
+               health_code_update();
+               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.024819 seconds and 5 git commands to generate.