aboutsummaryrefslogtreecommitdiffstats
path: root/src/sgsn/gprs_ranap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sgsn/gprs_ranap.c')
-rw-r--r--src/sgsn/gprs_ranap.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c
index 9c7a5dbb..7a334919 100644
--- a/src/sgsn/gprs_ranap.c
+++ b/src/sgsn/gprs_ranap.c
@@ -25,6 +25,7 @@
#include <gtp.h>
#include <osmocom/core/rate_ctr.h>
+#include <osmocom/core/tdef.h>
#include <osmocom/ranap/ranap_common.h>
@@ -162,8 +163,6 @@ int sgsn_ranap_iu_event(struct ranap_ue_conn_ctx *ctx, enum ranap_iu_event_type
return rc;
}
-/* TODO: use timers */
-#define TIMEOUT_RANAP_RELEASE_SEC 5
void sgsn_ranap_iu_free(struct sgsn_mm_ctx *ctx)
{
if (!ctx)
@@ -179,15 +178,19 @@ void sgsn_ranap_iu_free(struct sgsn_mm_ctx *ctx)
void sgsn_ranap_iu_release_free(struct sgsn_mm_ctx *ctx,
const struct RANAP_Cause *cause)
{
+ unsigned long X1001;
+
if (!ctx)
return;
if (!ctx->iu.ue_ctx)
return;
+ X1001 = osmo_tdef_get(sgsn->cfg.T_defs, -1001, OSMO_TDEF_S, -1);
+
ranap_iu_tx_release_free(ctx->iu.ue_ctx,
cause,
- TIMEOUT_RANAP_RELEASE_SEC);
+ (int) X1001);
ctx->iu.ue_ctx = NULL;
}