MM Auth: introduce AUTH_ERROR constant.
Instead of using hardcoded -1 for errors, include -1 in the enum auth_action
type; apply its use.
In the mm_auth test, the string output changes from '(internal error)' to
'AUTH_ERROR', since now the proper enum value is used in auth_action_names[].
diff --git a/openbsc/tests/mm_auth/mm_auth_test.c b/openbsc/tests/mm_auth/mm_auth_test.c
index e541898..1d65984 100644
--- a/openbsc/tests/mm_auth/mm_auth_test.c
+++ b/openbsc/tests/mm_auth/mm_auth_test.c
@@ -141,7 +141,7 @@
test_get_authinfo_rc = -EIO;
auth_action = auth_get_tuple_for_subscr_verbose(&atuple, &subscr,
key_seq);
- OSMO_ASSERT(auth_action == -1);
+ OSMO_ASSERT(auth_action == AUTH_ERROR);
}
static void test_auth_not_avail()