osmo-hlr: log details for unknown IMSI / no auth data / db error
For unknown IMSI and no auth data for a known IMSI, log respective messages on
NOTICE level.
For database error, log on ERROR level.
Change-Id: I3838fa78567e7e92d797d90b8b90865d9ebba90a
diff --git a/src/hlr.c b/src/hlr.c
index 58f94f3..168e203 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -74,10 +74,17 @@
/* 0 means "0 tuples generated", which shouldn't happen.
* Treat the same as "no auth data". */
case -ENOKEY:
+ LOGP(DAUC, LOGL_NOTICE, "%s: IMSI known, but has no auth data;"
+ " Returning slightly inaccurate cause 'IMSI Unknown' via GSUP\n",
+ gsup->imsi);
+ gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN;
+ break;
case -ENOENT:
+ LOGP(DAUC, LOGL_NOTICE, "%s: IMSI not known\n", gsup->imsi);
gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN;
break;
default:
+ LOGP(DAUC, LOGL_ERROR, "%s: failure to look up IMSI in db\n", gsup->imsi);
gsup_out.cause = GMM_CAUSE_NET_FAIL;
break;
}