stream->chan->current_chunk_id,
stream->last_sequence_number);
pthread_mutex_unlock(&relayd->ctrl_sock_mutex);
+ if (ret < 0) {
+ ERR("Relayd rotate stream failed. Cleaning up relayd %" PRIu64".", relayd->net_seq_idx);
+ lttng_consumer_cleanup_relayd(relayd);
+ }
if (ret) {
ERR("Rotate relay stream");
}
pthread_mutex_lock(&relayd->ctrl_sock_mutex);
ret = relayd_rotate_rename(&relayd->control_sock, old_path, new_path);
+ if (ret < 0) {
+ ERR("Relayd rotate rename failed. Cleaning up relayd %" PRIu64".", relayd->net_seq_idx);
+ lttng_consumer_cleanup_relayd(relayd);
+ }
pthread_mutex_unlock(&relayd->ctrl_sock_mutex);
end:
return ret;
pthread_mutex_lock(&relayd->ctrl_sock_mutex);
ret = relayd_rotate_pending(&relayd->control_sock, chunk_id);
+ if (ret < 0) {
+ ERR("Relayd rotate pending failed. Cleaning up relayd %" PRIu64".", relayd->net_seq_idx);
+ lttng_consumer_cleanup_relayd(relayd);
+ }
pthread_mutex_unlock(&relayd->ctrl_sock_mutex);
end:
pthread_mutex_lock(&relayd->ctrl_sock_mutex);
ret = relayd_mkdir(&relayd->control_sock, path);
+ if (ret < 0) {
+ ERR("Relayd mkdir failed. Cleaning up relayd %" PRIu64".", relayd->net_seq_idx);
+ lttng_consumer_cleanup_relayd(relayd);
+ }
pthread_mutex_unlock(&relayd->ctrl_sock_mutex);
end: