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/32/18732/1
Claudiu Boriga 8 years ago committed by Richard Fuchs
parent 50178457a6
commit eee9fa24c0

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

Loading…
Cancel
Save