Browse Source

Get recording metadata call start from call struct

When we write out the start time of a call for the recording metadata,
we used to get the timestamp from the given `call_monologue.started`
member. This value changes after each SDP renegotiation. Now, we use the
`call.created` member.
pull/245/head
Dylan Mikus 10 years ago
committed by Eric Green
parent
commit
526e9c251c
1 changed files with 2 additions and 7 deletions
  1. +2
    -7
      daemon/recording.c

+ 2
- 7
daemon/recording.c View File

@ -225,15 +225,10 @@ int meta_finish_file(struct call *call) {
if (recording != NULL && recording->meta_fp != NULL) {
// Print start timestamp and end timestamp
// YYYY-MM-DDThh:mm:ss
time_t start = 0, end = 0;
time_t start = call->created;
time_t end = g_now.tv_sec;
char timebuffer[20];
struct tm *timeinfo;
if (call->monologues.head) {
struct call_monologue *ml;
ml = call->monologues.head->data;
start = ml->started.tv_sec;
end = g_now.tv_sec;
}
timeinfo = localtime(&start);
strftime(timebuffer, 20, "%FT%T", timeinfo);
fprintf(recording->meta_fp, "\n\n%s\n", timebuffer);


Loading…
Cancel
Save