adding regex back into MobilityManagement for OpenRegistration. It's in the manual, we should have it in the code.

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4151 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
Kurtis Heimerl
2012-09-21 20:07:40 +00:00
parent 2f8ea379e2
commit 182fde503d

View File

@@ -186,7 +186,19 @@ void Control::LocationUpdatingController(const L3LocationUpdatingRequest* lur, L
}
// This allows us to configure Open Registration
bool openRegistration = gConfig.defines("Control.LUR.OpenRegistration");
bool openRegistration = false;
if (gConfig.defines("Control.LUR.OpenRegistration")) {
if (!gConfig.defines("Control.LUR.OpenRegistration.Message")) {
gConfig.set("Control.LUR.OpenRegistration.Message","Welcome to the test network. Your IMSI is ");
}
Regexp rxp(gConfig.getStr("Control.LUR.OpenRegistration").c_str());
openRegistration = rxp.match(IMSI);
if (gConfig.defines("Control.LUR.OpenRegistration.Reject")) {
Regexp rxpReject(gConfig.getStr("Control.LUR.OpenRegistration.Reject").c_str());
bool openRegistrationReject = rxpReject.match(IMSI);
openRegistration = openRegistration && !openRegistrationReject;
}
}
// Query for IMEI?
if (gConfig.defines("Control.LUR.QueryIMEI")) {