if (ret) {
ERR("Failed to flush an empty packet at rotation point: stream id = %" PRIu64
", channel name = %s, session id = %" PRIu64,
if (ret) {
ERR("Failed to flush an empty packet at rotation point: stream id = %" PRIu64
", channel name = %s, session id = %" PRIu64,
stream->session_id = session_id;
stream->monitor = monitor;
stream->endpoint_status = CONSUMER_ENDPOINT_ACTIVE;
stream->session_id = session_id;
stream->monitor = monitor;
stream->endpoint_status = CONSUMER_ENDPOINT_ACTIVE;
stream->last_sequence_number = -1ULL;
stream->rotate_position = -1ULL;
/* Buffer is created with an open packet. */
stream->opened_packet_in_current_trace_chunk = true;
stream->last_sequence_number = -1ULL;
stream->rotate_position = -1ULL;
/* Buffer is created with an open packet. */
stream->opened_packet_in_current_trace_chunk = true;
- pthread_mutex_init(&stream->lock, NULL);
- pthread_mutex_init(&stream->metadata_timer_lock, NULL);
+ pthread_mutex_init(&stream->lock, nullptr);
+ pthread_mutex_init(&stream->metadata_timer_lock, nullptr);
/* If channel is the metadata, flag this stream as metadata. */
if (type == CONSUMER_CHANNEL_TYPE_METADATA) {
/* If channel is the metadata, flag this stream as metadata. */
if (type == CONSUMER_CHANNEL_TYPE_METADATA) {
/* Metadata is flat out. */
strncpy(stream->name, DEFAULT_METADATA_NAME, sizeof(stream->name));
/* Live rendez-vous point. */
/* Metadata is flat out. */
strncpy(stream->name, DEFAULT_METADATA_NAME, sizeof(stream->name));
/* Live rendez-vous point. */
- pthread_cond_init(&stream->metadata_rdv, NULL);
- pthread_mutex_init(&stream->metadata_rdv_lock, NULL);
+ pthread_cond_init(&stream->metadata_rdv, nullptr);
+ pthread_mutex_init(&stream->metadata_rdv_lock, nullptr);
} else {
/* Format stream name to <channel_name>_<cpu_number> */
ret = snprintf(stream->name, sizeof(stream->name), "%s_%d", channel_name, cpu);
} else {
/* Format stream name to <channel_name>_<cpu_number> */
ret = snprintf(stream->name, sizeof(stream->name), "%s_%d", channel_name, cpu);
if (type == CONSUMER_CHANNEL_TYPE_METADATA) {
stream->read_subbuffer_ops.lock = consumer_stream_metadata_lock_all;
if (type == CONSUMER_CHANNEL_TYPE_METADATA) {
stream->read_subbuffer_ops.lock = consumer_stream_metadata_lock_all;
consumer_stream_relayd_close(stream, relayd);
stream->net_seq_idx = -1ULL;
}
consumer_stream_relayd_close(stream, relayd);
stream->net_seq_idx = -1ULL;
}
lttng_dynamic_array_reset(&stream->read_subbuffer_ops.post_consume_cbs);
consumer_stream_free(stream);
}
lttng_dynamic_array_reset(&stream->read_subbuffer_ops.post_consume_cbs);
consumer_stream_free(stream);
}
stream->name,
stream->chan->tracefile_size,
stream->tracefile_count_current,
stream->name,
stream->chan->tracefile_size,
stream->tracefile_count_current,