diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-08-12 16:21:32 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-11-12 16:05:04 +0100 |
commit | b6db8d0efb3350f4ed24943366ccffdabdb392bf (patch) | |
tree | 82a1805d723f0e16dca16b59e677bcc55b181e92 | |
parent | 0dd4717063371d6938fbe3c10d9c216830b8ff5d (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
-rw-r--r-- | openbsc/src/libmsc/gsm_04_08.c | 12 |
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 3a7196198..087bcb4b7 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; } } |