X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.c;h=209869e762e4498cf40c706c3335afbb88ab4301;hp=b053df521d0f3a9b46cb7b17d6ed92257fb9bd41;hb=5f3aff8bbb7dfaa4aa9eb9234b6f2393c40b69bf;hpb=0e2d816a62eccd0d159ec254e87ff80a7e6cf1bb diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index b053df521..209869e76 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -2013,6 +2013,31 @@ error_push_metadata_fatal: end_rotate_channel_nosignal: goto end_nosignal; } + case LTTNG_CONSUMER_CLEAR_CHANNEL: + { + struct lttng_consumer_channel *channel; + uint64_t key = msg.u.clear_channel.key; + + channel = consumer_find_channel(key); + if (!channel) { + DBG("Channel %" PRIu64 " not found", key); + ret_code = LTTCOMM_CONSUMERD_CHAN_NOT_FOUND; + } else { + ret = lttng_consumer_clear_channel(channel); + if (ret) { + ERR("Clear channel failed key %" PRIu64, key); + 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; + } case LTTNG_CONSUMER_INIT: { ret_code = lttng_consumer_init_command(ctx,