summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-01-08 12:02:12 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-18 18:23:04 +0100
commit42755785707a11c8349b86c2afb98b7bc15c85dc (patch)
treea2f0113dc83c7d21ea42177193f3e94d3c3625ae
parentbce2061b43c1e38b766cc3738b4ad669211dc6a4 (diff)
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
-rw-r--r--openbsc/include/openbsc/gprs_sgsn.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index 7416e8cf7..c92d1cc7b 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -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;