aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/sgsn/gprs_gmm.h2
-rw-r--r--src/gprs/gprs_gmm.c10
-rw-r--r--src/gprs/gprs_sgsn.c4
3 files changed, 13 insertions, 3 deletions
diff --git a/include/osmocom/sgsn/gprs_gmm.h b/include/osmocom/sgsn/gprs_gmm.h
index 3c93efcb8..28c96ce67 100644
--- a/include/osmocom/sgsn/gprs_gmm.h
+++ b/include/osmocom/sgsn/gprs_gmm.h
@@ -43,4 +43,6 @@ int gsm48_tx_gmm_att_ack(struct sgsn_mm_ctx *mm);
/* TODO: move extract_subscr_* when gsm48_gmm_authorize() got removed */
void extract_subscr_msisdn(struct sgsn_mm_ctx *ctx);
void extract_subscr_hlr(struct sgsn_mm_ctx *ctx);
+
+void pdp_ctx_detach_mm_ctx(struct sgsn_pdp_ctx *pdp);
#endif /* _GPRS_GMM_H */
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index 6a5c5d9f3..9d8a8695a 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -2192,6 +2192,16 @@ static void pdpctx_timer_stop(struct sgsn_pdp_ctx *pdp, unsigned int T)
osmo_timer_del(&pdp->timer);
}
+void pdp_ctx_detach_mm_ctx(struct sgsn_pdp_ctx *pdp)
+{
+ /* Detach from MM context */
+ llist_del(&pdp->list);
+ pdp->mm = NULL;
+
+ /* stop timer 3395 */
+ pdpctx_timer_stop(pdp, 3395);
+}
+
#if 0
static void msgb_put_pdp_addr_ipv4(struct msgb *msg, uint32_t ipaddr)
{
diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c
index 55ce09616..ab5e79ab6 100644
--- a/src/gprs/gprs_sgsn.c
+++ b/src/gprs/gprs_sgsn.c
@@ -443,9 +443,7 @@ void sgsn_pdp_ctx_terminate(struct sgsn_pdp_ctx *pdp)
osmo_signal_dispatch(SS_SGSN, S_SGSN_PDP_TERMINATE, &sig_data);
/* Detach from MM context */
- llist_del(&pdp->list);
- pdp->mm = NULL;
-
+ pdp_ctx_detach_mm_ctx(pdp);
sgsn_delete_pdp_ctx(pdp);
}