diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-08-12 16:21:32 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-02-23 20:28:55 +0100 |
commit | 1bed088a4916e3761738c664a0ffc711778cf9ba (patch) | |
tree | 796d93c8afe08f74a920b64974c8ab137d35a224 | |
parent | baf9a1d6001342a82cc2383f1e2bcd16d1b55d12 (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 649eb6a69..8fb73e62b 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -248,11 +248,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 @@ -260,14 +260,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; @@ -277,9 +277,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; } } |