Skip to content

Commit

Permalink
daily log file enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
rosecitytransit committed Apr 16, 2023
1 parent 48bed99 commit 9e0b63f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion trunk-recorder/call.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void Call::end_call() {
if (jsonfile.is_open()) {
jsonfile << "{\n";
jsonfile << "\"freq\": " << this->curr_freq << ",\n";
jsonfile << "\"start_time\": " << this->get_start_time() << ",\n";
jsonfile << "\"start_time\": " << this->start_time << ",\n";
jsonfile << "\"stop_time\": " << this->stop_time << ",\n";
jsonfile << "\"emergency\": " << this->emergency << ",\n";
jsonfile << "\"duplex\": " << this->duplex << ",\n";
Expand Down Expand Up @@ -181,6 +181,8 @@ void Call::end_call() {
jsonfile << "]\n";
jsonfile << "}\n";
jsonfile.close();
} else {
BOOST_LOG_TRIVIAL(error) << "Can't open JSON file for call info. TG: " << this->talkgroup << " start_time: " << this->start_time << " Freq: " << this->curr_freq;
}

if (sys->get_daily_log()) {
Expand Down Expand Up @@ -530,6 +532,10 @@ long Call::get_stop_time() {
return stop_time;
}

long Call::get_start_time() {
return start_time;
}

char *Call::get_converted_filename() {
return converted_filename;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk-recorder/call.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class Call {
long stopping_elapsed();
long elapsed();

long get_start_time();
double get_current_length();
long get_stop_time();
void set_debug_recording(bool m);
Expand All @@ -96,7 +97,6 @@ class Call {
void set_tdma_slot(int s);
int get_tdma_slot();
const char *get_xor_mask();
virtual time_t get_start_time() {return start_time;}
virtual bool is_conventional() { return false; }
void set_encrypted(bool m);
bool get_encrypted();
Expand Down

0 comments on commit 9e0b63f

Please sign in to comment.