diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-10-09 17:56:04 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2017-10-10 02:39:09 +0200 |
commit | 40aa61ccf0e45df0d7e1d58521a118d4c5a953ee (patch) | |
tree | cb3b4d26780d6a21de97ecf0e0e905146dbc5a25 /src/db_auc.c | |
parent | 0cac0a067e5824d0e0dc6b3109d7f33974c60df4 (diff) |
cosmetic: log IMSI='<imsi>', log "no such subscriber"
In LOGHLR and LOGAUC, log IMSI='<imsi>' instead of just <imsi>:
In the log, it is not always obvious to the reader that the printed number
refers to an IMSI (vs. an MSISDN or in the future an IMEI).
In db_get_auth_data(), log "No such subscriber" instead of just "Unknown", to
clarify what exactly is meant.
Change-Id: I2ec8ab5e67d4e95083f6e39232fc91ebaa080cb8
Diffstat (limited to 'src/db_auc.c')
-rw-r--r-- | src/db_auc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db_auc.c b/src/db_auc.c index 07039d4..7aad06d 100644 --- a/src/db_auc.c +++ b/src/db_auc.c @@ -30,7 +30,7 @@ #include "auc.h" #include "rand.h" -#define LOGAUC(imsi, level, fmt, args ...) LOGP(DAUC, level, "%s: " fmt, imsi, ## args) +#define LOGAUC(imsi, level, fmt, args ...) LOGP(DAUC, level, "IMSI='%s': " fmt, imsi, ## args) /* update the SQN for a given subscriber ID */ int db_update_sqn(struct db_context *dbc, uint64_t id, @@ -98,7 +98,7 @@ int db_get_auth_data(struct db_context *dbc, const char *imsi, /* execute the statement */ rc = sqlite3_step(stmt); if (rc == SQLITE_DONE) { - LOGAUC(imsi, LOGL_INFO, "Unknown\n"); + LOGAUC(imsi, LOGL_INFO, "No such subscriber\n"); ret = 0; goto out; } else if (rc != SQLITE_ROW) { |