aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-07-18 15:04:46 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-07-18 15:05:04 +0700
commit4b8e309f57bcd8c176bdf265bf31a010096de4df (patch)
tree0436334dd53aade4fe1271344debb48e316f8194
parent55fcf111e1a8b83cc76c82e27315a0695e5b23d1 (diff)
sgsn_mm_ctx_find_ggsn_ctx(): fix: always set gsm_cause
GCC 9 complains that variable 'gsm_cause' in do_act_pdp_req() may be uninitialized. This may happen if sgsn_mm_ctx_find_ggsn_ctx() would return NULL due to no static GGSN configured. Change-Id: I09c608045dd35b9898b82e236a306ab9a6c2c0b9
-rw-r--r--src/gprs/gprs_sgsn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c
index fae09aee7..9a5de4108 100644
--- a/src/gprs/gprs_sgsn.c
+++ b/src/gprs/gprs_sgsn.c
@@ -920,7 +920,8 @@ struct sgsn_ggsn_ctx *sgsn_mm_ctx_find_ggsn_ctx(struct sgsn_mm_ctx *mmctx,
LOGMMCTXP(LOGL_NOTICE, mmctx,
"No static GGSN configured. Selected APN '%s'\n",
selected_apn_str);
- return NULL;
+ *gsm_cause = GSM_CAUSE_MISSING_APN;
+ return NULL;
}
LOGMMCTXP(LOGL_INFO, mmctx,