summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-08-25 09:15:40 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-05-02 20:13:41 +0200
commitf7f4feca8e8110a6b99888728f2d3b3285441ae3 (patch)
tree66dab1e43fdce83ce65db74afb4d65e0f5e2513e
parentae4e7964dba692695d21da404029b48b99619d74 (diff)
bsc: Do not re-start the grace timer when we are in the grace period
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_rf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_rf.c b/openbsc/src/osmo-bsc/osmo_bsc_rf.c
index 6cd3a3ffd..430b230fb 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_rf.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_rf.c
@@ -239,6 +239,11 @@ static void grace_timeout(void *_data)
static int enter_grace(struct osmo_bsc_rf *rf)
{
+ if (osmo_timer_pending(&rf->grace_timeout)) {
+ LOGP(DINP, LOGL_NOTICE, "RF Grace timer is pending. Not restarting.\n");
+ return 0;
+ }
+
rf->grace_timeout.cb = grace_timeout;
rf->grace_timeout.data = rf;
osmo_timer_schedule(&rf->grace_timeout, rf->gsm_network->bsc_data->mid_call_timeout, 0);