aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_msc_ip.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-29 18:44:39 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-29 18:44:39 +0800
commitc94b9c4eb4ab6a5165a325d8f250d93da29df6d9 (patch)
treeffeaa62ec3fbd1d0372e9feda42e20cbcc6af837 /openbsc/src/bsc_msc_ip.c
parentb5fa05ff416fc7244f6a22b2b0d62890fdea3184 (diff)
bsc_grace: Add a new per network check to decide if new connections are allowed
In case of an ordered RF shutdown we can enter a grace period where no new RF connections are allowed but active connections will stay alive until the RF is switched off.
Diffstat (limited to 'openbsc/src/bsc_msc_ip.c')
-rw-r--r--openbsc/src/bsc_msc_ip.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c
index 36381add7..30b07b541 100644
--- a/openbsc/src/bsc_msc_ip.c
+++ b/openbsc/src/bsc_msc_ip.c
@@ -46,6 +46,7 @@
#include <openbsc/bsc_msc.h>
#include <openbsc/bsc_nat.h>
#include <openbsc/bsc_msc_rf.h>
+#include <openbsc/bsc_msc_grace.h>
#include <osmocore/select.h>
#include <osmocore/talloc.h>
@@ -294,6 +295,11 @@ static int open_sccp_connection(struct msgb *layer3)
return -1;
}
+ if (!bsc_grace_allow_new_connection(bsc_gsmnet)) {
+ LOGP(DMSC, LOGL_NOTICE, "BSC in grace period. No new connections.\n");
+ return -1;
+ }
+
LOGP(DMSC, LOGL_DEBUG, "Opening new layer3 connection\n");
sccp_connection = sccp_connection_socket();
if (!sccp_connection) {