gprs: Add LOGGSUBSCRP macro to log subscriber info

This patch adds a new logging macro, that logs to DGPRS and provides
a uniform prefix containing the IMSI without using the mm reference.
This is an improvement over using LOGMMCTXP, since the new macro also
provides an IMSI if no MM context is attached.

Sponsored-by: On-Waves ehf
This commit is contained in:
Jacob Erlbeck 2015-01-08 12:02:12 +01:00 committed by Holger Hans Peter Freyther
parent bce2061b43
commit 4275578570
1 changed files with 4 additions and 0 deletions

View File

@ -278,6 +278,10 @@ struct sgsn_subscriber_data {
int error_cause;
};
#define LOGGSUBSCRP(level, subscr, fmt, args...) \
LOGP(DGPRS, level, "SUBSCR(%s) " fmt, (subscr)->imsi, \
## args)
struct sgsn_config;
struct sgsn_instance;
extern const struct value_string *sgsn_auth_state_names;