Skip to content

Commit

Permalink
LMC logger: do not use reliable for ADD_LOGGED_MSG in data logger side
Browse files Browse the repository at this point in the history
  • Loading branch information
jnippula committed Jan 25, 2024
1 parent e4e0960 commit 2113880
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/modules/logger/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,17 @@ void Logger::write_add_logged_msg(LogType type, LoggerSubscription &subscription
_writer.set_need_reliable_transfer(true);
#ifdef LOGGER_PARALLEL_LOGGING
thread_data_t *th_data = (thread_data_t *) pthread_getspecific(pthread_data_key);
write_message(type, &msg, msg_size, true, th_data->wait_for_ack);

// Do to use reliable for data logger side, because add_logged_msg triggers
// ulog parser to switch from definitions to data parsing causing latter
// format messages to be ignored.
if (th_data->wait_for_ack) {
write_message(type, &msg, msg_size, true, th_data->wait_for_ack);

} else {
write_message(type, &msg, msg_size, false, th_data->wait_for_ack);
}

#else
write_message(type, &msg, msg_size);
#endif
Expand Down

0 comments on commit 2113880

Please sign in to comment.