From 526e9c251ceb55f44316f34ae39e7c3f8553d8a4 Mon Sep 17 00:00:00 2001 From: Dylan Mikus Date: Mon, 21 Mar 2016 19:51:16 +0000 Subject: [PATCH] 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. --- daemon/recording.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/daemon/recording.c b/daemon/recording.c index 265f99fc7..3bd6b7d8d 100644 --- a/daemon/recording.c +++ b/daemon/recording.c @@ -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);