DBG("UST consumer flush channel key %" PRIu64, chan_key);
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
channel = consumer_find_channel(chan_key);
if (!channel) {
ERR("UST consumer flush channel %" PRIu64 " not found", chan_key);
DBG("UST consumer clear quiescent channel key %" PRIu64, chan_key);
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
channel = consumer_find_channel(chan_key);
if (!channel) {
ERR("UST consumer clear quiescent channel %" PRIu64 " not found", chan_key);
DBG("UST consumer snapshot metadata with key %" PRIu64 " at path %s", key, path);
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
LTTNG_ASSERT(!metadata_channel->monitor);
LTTNG_ASSERT(ctx);
ASSERT_RCU_READ_LOCKED();
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
if (relayd_id != (uint64_t) -1ULL) {
use_relayd = 1;
health_code_update();
/* relayd needs RCU read-side lock */
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
switch (msg.cmd_type) {
case LTTNG_CONSUMER_ADD_RELAYD_SOCKET:
{
- uint32_t major = msg.u.relayd_sock.major;
- uint32_t minor = msg.u.relayd_sock.minor;
- enum lttcomm_sock_proto protocol =
+ const uint32_t major = msg.u.relayd_sock.major;
+ const uint32_t minor = msg.u.relayd_sock.minor;
+ const lttcomm_sock_proto protocol =
(enum lttcomm_sock_proto) msg.u.relayd_sock.relayd_socket_protocol;
/* Session daemon status message are handled in the following call. */
}
case LTTNG_CONSUMER_DESTROY_RELAYD:
{
- uint64_t index = msg.u.destroy_relayd.net_seq_idx;
+ const uint64_t index = msg.u.destroy_relayd.net_seq_idx;
struct consumer_relayd_sock_pair *relayd;
DBG("UST consumer destroying relayd %" PRIu64, index);
{
int is_data_pending;
ssize_t ret_send;
- uint64_t id = msg.u.data_pending.session_id;
+ const uint64_t id = msg.u.data_pending.session_id;
DBG("UST consumer data pending command for id %" PRIu64, id);
case LTTNG_CONSUMER_GET_CHANNEL:
{
int ret, relayd_err = 0;
- uint64_t key = msg.u.get_channel.key;
+ const uint64_t key = msg.u.get_channel.key;
struct lttng_consumer_channel *found_channel;
found_channel = consumer_find_channel(key);
}
case LTTNG_CONSUMER_DESTROY_CHANNEL:
{
- uint64_t key = msg.u.destroy_channel.key;
+ const uint64_t key = msg.u.destroy_channel.key;
/*
* Only called if streams have not been sent to stream
case LTTNG_CONSUMER_PUSH_METADATA:
{
int ret;
- uint64_t len = msg.u.push_metadata.len;
- uint64_t key = msg.u.push_metadata.key;
- uint64_t offset = msg.u.push_metadata.target_offset;
- uint64_t version = msg.u.push_metadata.version;
+ const uint64_t len = msg.u.push_metadata.len;
+ const uint64_t key = msg.u.push_metadata.key;
+ const uint64_t offset = msg.u.push_metadata.target_offset;
+ const uint64_t version = msg.u.push_metadata.version;
struct lttng_consumer_channel *found_channel;
DBG("UST consumer push metadata key %" PRIu64 " of len %" PRIu64, key, len);
case LTTNG_CONSUMER_SNAPSHOT_CHANNEL:
{
struct lttng_consumer_channel *found_channel;
- uint64_t key = msg.u.snapshot_channel.key;
+ const uint64_t key = msg.u.snapshot_channel.key;
int ret_send;
found_channel = consumer_find_channel(key);
struct lttng_ht *ht;
struct lttng_consumer_stream *stream;
uint64_t id = msg.u.discarded_events.session_id;
- uint64_t key = msg.u.discarded_events.channel_key;
+ const uint64_t key = msg.u.discarded_events.channel_key;
DBG("UST consumer discarded events command for session id %" PRIu64, id);
pthread_mutex_lock(&the_consumer_data.lock);
struct lttng_ht *ht;
struct lttng_consumer_stream *stream;
uint64_t id = msg.u.lost_packets.session_id;
- uint64_t key = msg.u.lost_packets.channel_key;
+ const uint64_t key = msg.u.lost_packets.channel_key;
DBG("UST consumer lost packets command for session id %" PRIu64, id);
pthread_mutex_lock(&the_consumer_data.lock);
case LTTNG_CONSUMER_ROTATE_CHANNEL:
{
struct lttng_consumer_channel *found_channel;
- uint64_t key = msg.u.rotate_channel.key;
+ const uint64_t key = msg.u.rotate_channel.key;
int ret_send_status;
found_channel = consumer_find_channel(key);
case LTTNG_CONSUMER_CLEAR_CHANNEL:
{
struct lttng_consumer_channel *found_channel;
- uint64_t key = msg.u.clear_channel.key;
+ const uint64_t key = msg.u.clear_channel.key;
int ret_send_status;
found_channel = consumer_find_channel(key);
DBG("UST consumer closing all metadata streams");
{
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
cds_lfht_for_each_entry (metadata_ht->ht, &iter.iter, stream, node.node) {
health_code_update();
{
struct lttcomm_metadata_request_msg request;
struct lttcomm_consumer_msg msg;
- enum lttcomm_return_code ret_code = LTTCOMM_CONSUMERD_SUCCESS;
+ const lttcomm_return_code ret_code = LTTCOMM_CONSUMERD_SUCCESS;
uint64_t len, key, offset, version;
int ret;