[MERGED] osmo-hlr[master]: osmo-hlr: log details for unknown IMSI / no auth data / db e...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Nov 30 11:01:33 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: osmo-hlr: log details for unknown IMSI / no auth data / db error
......................................................................


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
---
M src/hlr.c
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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;
 		}

-- 
To view, visit https://gerrit.osmocom.org/4988
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3838fa78567e7e92d797d90b8b90865d9ebba90a
Gerrit-PatchSet: 3
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list