Skip to content

Commit

Permalink
Update main.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed May 7, 2023
1 parent e33e441 commit 9313863
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions trunk-recorder/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1473,25 +1473,24 @@ for (vector<System *>::iterator sys_it = systems.begin(); sys_it != systems.end(
if ((system->get_system_type() == "P25") || (system->get_system_type() == "smartnet") ) {

while ((msg = system->get_msg_queue()->delete_head_nowait()) != 0) {
sys_num = msg->arg1();
sys = find_system(sys_num);

if (sys) {
sys->set_message_count(sys->get_message_count() + 1);

if (sys->get_system_type() == "smartnet") {
trunk_messages = smartnet_parser->parse_message(msg->to_string(), sys);
handle_message(trunk_messages, sys);

system->set_message_count(sys->get_message_count() + 1);

if (system->get_system_type() == "smartnet") {
trunk_messages = smartnet_parser->parse_message(msg->to_string(), system);
handle_message(trunk_messages, system);
}

if (sys->get_system_type() == "p25") {
trunk_messages = p25_parser->parse_message(msg, sys);
handle_message(trunk_messages, sys);
if (system->get_system_type() == "p25") {
trunk_messages = p25_parser->parse_message(msg, system);
handle_message(trunk_messages, system);
}
}


if (msg->type() == -1) {
BOOST_LOG_TRIVIAL(error) << "[" << sys->get_short_name() << "]\t process_data_unit timeout";
BOOST_LOG_TRIVIAL(error) << "[" << system->get_short_name() << "]\t process_data_unit timeout";
}

msg.reset();
Expand Down

0 comments on commit 9313863

Please sign in to comment.