From eee9fa24c0caff3c627ead4e38dd09e36ac29294 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 8cc0a31e6..92401c0bf 100644 --- a/daemon/redis.c +++ b/daemon/redis.c @@ -1549,7 +1549,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); }