#include <common/relayd/relayd.hpp>
#include <common/sessiond-comm/relayd.hpp>
#include <common/sessiond-comm/sessiond-comm.hpp>
#include <common/relayd/relayd.hpp>
#include <common/sessiond-comm/relayd.hpp>
#include <common/sessiond-comm/sessiond-comm.hpp>
/* Prevent channel modifications while we perform the snapshot.*/
pthread_mutex_lock(&channel->lock);
/* Prevent channel modifications while we perform the snapshot.*/
pthread_mutex_lock(&channel->lock);
/* Splice is not supported yet for channel snapshot. */
if (channel->output != CONSUMER_CHANNEL_MMAP) {
/* Splice is not supported yet for channel snapshot. */
if (channel->output != CONSUMER_CHANNEL_MMAP) {
metadata_stream->read_subbuffer_ops.unlock(metadata_stream);
consumer_stream_destroy(metadata_stream, nullptr);
metadata_channel->metadata_stream = nullptr;
metadata_stream->read_subbuffer_ops.unlock(metadata_stream);
consumer_stream_destroy(metadata_stream, nullptr);
metadata_channel->metadata_stream = nullptr;