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 d5fea12937)
changes/33/18733/1
Claudiu Boriga 8 years ago committed by Richard Fuchs
parent 87ad3b2889
commit 98218e7681

@ -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