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
This commit is contained in:
parent
0cac0a067e
commit
40aa61ccf0
|
@ -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) {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "logging.h"
|
||||
#include "db.h"
|
||||
|
||||
#define LOGHLR(imsi, level, fmt, args ...) LOGP(DAUC, level, "%s: " fmt, imsi, ## args)
|
||||
#define LOGHLR(imsi, level, fmt, args ...) LOGP(DAUC, level, "IMSI='%s': " fmt, imsi, ## args)
|
||||
|
||||
#define SL3_TXT(x, stmt, idx) do { \
|
||||
const char *_txt = (const char *) sqlite3_column_text(stmt, idx); \
|
||||
|
|
Loading…
Reference in New Issue