From 1e96af63259272b73625e1aa40f1b935aece7c29 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Tue, 17 Mar 2015 08:11:25 +0100 Subject: bssgp: Set blocking and reset timer to 30s Currently the timer T1 and T2 are hard-coded to 1s which is pretty low in consideration of a possible high latency connection to the SGSN. This commit introduces macros for the timer values and sets them to 30s. Sponsored-by: On-Waves ehf --- src/gprs_bssgp_pcu.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 0782dbf9..daadc635 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -24,6 +24,9 @@ #include #include +#define BSSGP_TIMER_T1 30 /* Guards the (un)blocking procedures */ +#define BSSGP_TIMER_T2 30 /* Guards the reset procedure */ + static struct gprs_bssgp_pcu the_pcu = { 0, }; extern void *tall_pcu_ctx; @@ -438,7 +441,7 @@ static void bvc_timeout(void *_priv) if (!the_pcu.bvc_sig_reset) { LOGP(DBSSGP, LOGL_INFO, "Sending reset on BVCI 0\n"); bssgp_tx_bvc_reset(the_pcu.bctx, 0, BSSGP_CAUSE_OML_INTERV); - osmo_timer_schedule(&the_pcu.bvc_timer, 1, 0); + osmo_timer_schedule(&the_pcu.bvc_timer, BSSGP_TIMER_T2, 0); return; } @@ -446,7 +449,7 @@ static void bvc_timeout(void *_priv) LOGP(DBSSGP, LOGL_INFO, "Sending reset on BVCI %d\n", the_pcu.bctx->bvci); bssgp_tx_bvc_reset(the_pcu.bctx, the_pcu.bctx->bvci, BSSGP_CAUSE_OML_INTERV); - osmo_timer_schedule(&the_pcu.bvc_timer, 1, 0); + osmo_timer_schedule(&the_pcu.bvc_timer, BSSGP_TIMER_T2, 0); return; } @@ -454,7 +457,7 @@ static void bvc_timeout(void *_priv) LOGP(DBSSGP, LOGL_INFO, "Sending unblock on BVCI %d\n", the_pcu.bctx->bvci); bssgp_tx_bvc_unblock(the_pcu.bctx); - osmo_timer_schedule(&the_pcu.bvc_timer, 1, 0); + osmo_timer_schedule(&the_pcu.bvc_timer, BSSGP_TIMER_T1, 0); return; } -- cgit v1.2.3