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
pull/409/head
Claudiu Boriga 8 years ago
parent fade693a1c
commit d5fea12937

@ -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);
}

Loading…
Cancel
Save