Skip to content

Commit

Permalink
override recordUnknown if an unknown talkgroup is in a patch with a k…
Browse files Browse the repository at this point in the history
…nown talkgroup (#970)
  • Loading branch information
aaknitt authored Sep 4, 2024
1 parent 6261282 commit 4d90da1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion trunk-recorder/monitor_systems.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,23 @@ bool start_recorder(Call *call, TrunkMessage message, Config &config, System *sy

bool source_found = false;
bool recorder_found = false;
bool override_record_unknown = false;

Recorder *recorder;
Recorder *debug_recorder;
Recorder *sigmf_recorder;

if (!talkgroup){
BOOST_FOREACH (auto &TGID, sys->get_talkgroup_patch(call->get_talkgroup())) { //for each talkgroup in the patch
if (sys->find_talkgroup(TGID) != NULL){ //if the patched talkgroup is known
override_record_unknown = true;
std::string loghdr = log_header( call->get_short_name(), call->get_call_num(), call->get_talkgroup_display(), call->get_freq());
BOOST_LOG_TRIVIAL(info) << loghdr << "\u001b[33mEnabling recording of TG not in Talkgroup File due to active supergroup patch\u001b[0m ";
}
}
}

if (!talkgroup && (sys->get_record_unknown() == false)) {
if (!talkgroup && (sys->get_record_unknown() == false) && override_record_unknown == false) {
call->set_state(MONITORING);
call->set_monitoring_state(UNKNOWN_TG);
if (sys->get_hideUnknown() == false) {
Expand Down

0 comments on commit 4d90da1

Please sign in to comment.