aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hlr.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/hlr.c b/src/hlr.c
index 861597a..ef008f0 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -67,12 +67,16 @@ static int rx_send_auth_info(struct osmo_gsup_conn *conn,
gsup_out.auth_vectors,
ARRAY_SIZE(gsup_out.auth_vectors),
gsup->rand, gsup->auts);
- if (rc < 0) {
- gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR;
- gsup_out.cause = GMM_CAUSE_NET_FAIL;
- } else if (rc == 0) {
+ if (rc <= 0) {
gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR;
- gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN;
+ switch (rc) {
+ case 0:
+ gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN;
+ break;
+ default:
+ gsup_out.cause = GMM_CAUSE_NET_FAIL;
+ break;
+ }
} else {
gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT;
gsup_out.num_auth_vectors = rc;