aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-08-12 16:21:32 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-29 13:23:54 +0200
commit8df85ca8a8e05613eb7f37ae339afd3cfbb3b24f (patch)
treec091a9956d3b0639d42aa38a1f6a1c70ac126aa4 /openbsc
parent733aad491727db0dd9c96c6afd84cb2b91ebba34 (diff)
cosmetic prep: change int -> bool authorize_subscriber()
Upcoming function subscr_authorized() will flip this to bool, so separate this change cosmetically. Change-Id: Iba0184a71afa01141ef06c474cb554e79ad8f5d5
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 7f53b1712..e589bebde 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -246,11 +246,11 @@ static bool subscr_regexp_check(const struct gsm_network *net, const char *imsi)
return false;
}
-static int authorize_subscriber(struct gsm_loc_updating_operation *loc,
+static bool authorize_subscriber(struct gsm_loc_updating_operation *loc,
struct gsm_subscriber *subscriber)
{
if (!subscriber)
- return 0;
+ return false;
/*
* Do not send accept yet as more information should arrive. Some
@@ -258,14 +258,14 @@ static int authorize_subscriber(struct gsm_loc_updating_operation *loc,
* what we want to do with that.
*/
if (loc && (loc->waiting_for_imsi || loc->waiting_for_imei))
- return 0;
+ return false;
switch (subscriber->group->net->auth_policy) {
case GSM_AUTH_POLICY_CLOSED:
return subscriber->authorized;
case GSM_AUTH_POLICY_REGEXP:
if (subscriber->authorized)
- return 1;
+ return true;
if (subscr_regexp_check(subscriber->group->net,
subscriber->imsi))
subscriber->authorized = 1;
@@ -275,9 +275,9 @@ static int authorize_subscriber(struct gsm_loc_updating_operation *loc,
return subscriber->authorized;
return (subscriber->flags & GSM_SUBSCRIBER_FIRST_CONTACT);
case GSM_AUTH_POLICY_ACCEPT_ALL:
- return 1;
+ return true;
default:
- return 0;
+ return false;
}
}