aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-08-25 09:15:40 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2011-11-04 12:27:12 +0100
commite7a941d990a7f60f44954fb67601e4275fcf0cfb (patch)
treec46037b9f03f87fa21bad49cdc079af7a62d34e7
parent9f24040da22dfe2f1753a67d462ce960f6e0cc1f (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);