From 98218e768187f17d9058f407ebab89607dde76da Mon Sep 17 00:00:00 2001 From: Claudiu Boriga Date: Thu, 19 Oct 2017 12:44:46 +0200 Subject: [PATCH] check call.recording structure before using it if call recording is not configured but the redis db contains calls with recording flag, then call.recording can be NULL (cherry picked from commit d5fea12937d81f18ccd02ccec14a39653e8fe79f) --- daemon/redis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/redis.c b/daemon/redis.c index b8fa0c763..fc2f80cc2 100644 --- a/daemon/redis.c +++ b/daemon/redis.c @@ -1527,7 +1527,7 @@ static void json_restore_call(struct redis *r, struct callmaster *m, const str * if (!redis_hash_get_str(&s, &call, "recording_meta_prefix")) { recording_start(c, s.s); - if (!redis_hash_get_str(&s, &call, "recording_metadata")) + if ((c->recording) && (!redis_hash_get_str(&s, &call, "recording_metadata"))) call_str_cpy(c, &c->recording->metadata, &s); }