From 0ff8a4ee111f4df01505a85e893c0afa5cdccdcc 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 (cherry picked from commit 30c506997f6a21baf72787563fa1366ada1a3c39) --- daemon/codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/codec.c b/daemon/codec.c index c0d19ed17..0b4cbd656 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -767,7 +767,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); @@ -785,7 +785,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; }