Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch handling improvement - override recordUnknown #970

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading