Skip to content

Commit

Permalink
adding message.source = call->talkgroup checking
Browse files Browse the repository at this point in the history
this is really meant for unit-unit calls, and where the new transmission is reversed

to keep transmissions together, message.talkgroup and message.source could be switched here (not doing so if real talkgroups and radio IDs can overlap)
  • Loading branch information
rosecitytransit committed May 16, 2021
1 parent 3b3fa38 commit 0eb05cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions trunk-recorder/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,10 @@ void handle_call(TrunkMessage message, System *sys) {
for (vector<Call *>::iterator it = calls.begin(); it != calls.end();) {
Call *call = *it;

if ((call->get_talkgroup() == message.source) && (call->get_sys_num() == message.sys_num)) {
BOOST_LOG_TRIVIAL(error) << "WARNING: Old call found w/this message.source. Old TG: " << call->get_talkgroup_display() << "/" << call->get_talkgroup() << "New TG: " << message.talkgroup << " New src: " << message.source;
}

if ((call->get_talkgroup() == message.talkgroup) && (call->get_sys_num() == message.sys_num)) {
call_found = true;

Expand Down

0 comments on commit 0eb05cd

Please sign in to comment.