aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/osmo_bsc_grace.h6
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_bssap.c2
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_grace.c4
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_sccp.c5
4 files changed, 8 insertions, 9 deletions
diff --git a/openbsc/include/openbsc/osmo_bsc_grace.h b/openbsc/include/openbsc/osmo_bsc_grace.h
index 45d4db8ec..48849962c 100644
--- a/openbsc/include/openbsc/osmo_bsc_grace.h
+++ b/openbsc/include/openbsc/osmo_bsc_grace.h
@@ -1,6 +1,6 @@
/*
- * (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
- * (C) 2010 by On-Waves
+ * (C) 2010-2012 by Holger Hans Peter Freyther <zecke@selfish.org>
+ * (C) 2010-2012 by On-Waves
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -23,6 +23,6 @@
#include "gsm_data.h"
-int bsc_grace_allow_new_connection(struct gsm_network *network);
+int bsc_grace_allow_new_connection(struct gsm_network *net, struct gsm_bts *bts);
#endif
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
index 6b8504d21..8ea5a65ef 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
@@ -413,7 +413,7 @@ static int bssmap_rcvmsg_udt(struct osmo_msc_data *msc,
ret = bssmap_handle_reset_ack(msc, msg, length);
break;
case BSS_MAP_MSG_PAGING:
- if (bsc_grace_allow_new_connection(msc->network))
+ if (bsc_grace_allow_new_connection(msc->network, NULL))
ret = bssmap_handle_paging(msc, msg, length);
break;
}
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_grace.c b/openbsc/src/osmo-bsc/osmo_bsc_grace.c
index 3f73b5018..ad0a37e9c 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_grace.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_grace.c
@@ -24,10 +24,12 @@
#include <openbsc/gsm_04_80.h>
#include <openbsc/signal.h>
-int bsc_grace_allow_new_connection(struct gsm_network *network)
+int bsc_grace_allow_new_connection(struct gsm_network *network, struct gsm_bts *bts)
{
if (!network->bsc_data->rf_ctrl)
return 1;
+ if (bts && bts->excl_from_rf_lock)
+ return 1;
return network->bsc_data->rf_ctrl->policy == S_RF_ON;
}
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
index 37eb1b799..3533d6df0 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
@@ -190,12 +190,9 @@ int bsc_queue_for_msc(struct osmo_bsc_sccp_con *conn, struct msgb *msg)
int bsc_create_new_connection(struct gsm_subscriber_connection *conn,
struct osmo_msc_data *msc)
{
- struct gsm_network *net;
struct osmo_bsc_sccp_con *bsc_con;
struct sccp_connection *sccp;
- net = conn->bts->network;
-
/* This should not trigger */
if (!msc->msc_con->is_authenticated) {
LOGP(DMSC, LOGL_ERROR,
@@ -203,7 +200,7 @@ int bsc_create_new_connection(struct gsm_subscriber_connection *conn,
return -1;
}
- if (!bsc_grace_allow_new_connection(net)) {
+ if (!bsc_grace_allow_new_connection(conn->bts->network, conn->bts)) {
LOGP(DMSC, LOGL_NOTICE, "BSC in grace period. No new connections.\n");
return -1;
}