diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-10-23 13:03:58 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-10-23 13:04:48 +0200 |
commit | 60581ae7c9a8bf2ee6ba9c7efa567a3b207d7161 (patch) | |
tree | 53b9b496a258ebdeefed17d151f2bef4c1843227 /src | |
parent | c70e8388c7266a562da8bd737da29a8af50e4c69 (diff) |
sgsn_delete_pdp_ctx: Add documentation and assert assumptions
This function is only expected to be called if the GTP side of the PDP
ctx is still alive, since it will tear down the GTP side and then finish
the pending MS side if needed.
The asserts are added to ease debugging since it was noted that a few
callers were using this function without properly checking the status of
the pdp ctx.
Related: OS#4817
Change-Id: I4248e2e9846fec5ae2c8557384da2deb86668c50
Diffstat (limited to 'src')
-rw-r--r-- | src/sgsn/sgsn_libgtp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c index 808149244..367570d3e 100644 --- a/src/sgsn/sgsn_libgtp.c +++ b/src/sgsn/sgsn_libgtp.c @@ -312,11 +312,16 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn, return pctx; } -/* SGSN wants to delete a PDP context */ +/* SGSN wants to delete a PDP context, send first DeleteCtxReq on the GTP side, + then upon DeleteCtx ACK it will send DeactPdpAcc to the MS if still + connected. */ int sgsn_delete_pdp_ctx(struct sgsn_pdp_ctx *pctx) { LOGPDPCTXP(LOGL_INFO, pctx, "Delete PDP Context\n"); + OSMO_ASSERT(pctx->ggsn); + OSMO_ASSERT(pctx->lib); + /* FIXME: decide if we need teardown or not ! */ return gtp_delete_context_req2(pctx->ggsn->gsn, pctx->lib, pctx, 1); } |