From 5741f13930bff9131cea79058f14d6234a0a0cbd Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 28 Jan 2021 14:49:43 -0500 Subject: [PATCH] TT#109251 fix redis restore segfault Change-Id: I501a47b065e7b8ff28a3ac157c0ce567f228557f --- daemon/codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/codec.c b/daemon/codec.c index 17a1de118..9fdcb4198 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -1065,7 +1065,7 @@ static void __generator_stop(struct call_media *media) { } static void __t38_options_from_flags(struct t38_options *t_opts, const struct sdp_ng_flags *flags) { -#define t38_opt(name) t_opts->name = flags->t38_ ## name +#define t38_opt(name) t_opts->name = flags ? flags->t38_ ## name : 0 t38_opt(no_ecm); t38_opt(no_v17); t38_opt(no_v27ter); @@ -1083,7 +1083,7 @@ static void __check_t38_gateway(struct call_media *pcm_media, struct call_media t_opts = sp->t38_options; else { // create our own options - if (flags->t38_fec) + if (flags && flags->t38_fec) t_opts.fec_span = 3; t_opts.max_ec_entries = 3; }