gprs_ranap: on Iu release, stop the attach fsm if running
A Iu release should stop any active procedure.
Change-Id: I78c6c0c4024657212d6abef51e226ce233018fee
diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c
index 8f45650..6ebbd69 100644
--- a/src/sgsn/gprs_ranap.c
+++ b/src/sgsn/gprs_ranap.c
@@ -137,6 +137,9 @@
else
sgsn_ranap_iu_free(mm);
+ /* TODO: move this into FSM */
+ if (mm->ran_type == MM_CTX_T_UTRAN_Iu && mm->gmm_att_req.fsm->state != ST_INIT)
+ osmo_fsm_inst_dispatch(mm->gmm_att_req.fsm, E_REJECT, (void *) GMM_DISCARD_MS_WITHOUT_REJECT);
rc = 0;
break;
case RANAP_IU_EVENT_SECURITY_MODE_COMPLETE: