aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-07-29 12:28:11 +0200
committerHarald Welte <laforge@gnumonks.org>2018-07-30 16:33:26 +0200
commit3a190461eec2902594d06f4f3641056809d6e209 (patch)
tree6d307737dc25f879af24a3909661808d251ec0e0
parentf76578d6a8e57111aeacb1aa893c68c479306573 (diff)
hlr_ussd: Introduce LOGPSS() macro
-rw-r--r--src/hlr_ussd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c
index 41fba34..ef4063c 100644
--- a/src/hlr_ussd.c
+++ b/src/hlr_ussd.c
@@ -126,6 +126,9 @@ struct hlr_euse *ussd_euse_find_7bit_gsm(struct hlr *hlr, const char *ussd_code)
* handling functions for individual GSUP messages
***********************************************************************/
+#define LOGPSS(ss, lvl, fmt, args...) \
+ LOGP(DMAIN, lvl, "%s/0x%08x: " fmt, (ss)->imsi, (ss)->session_id, ## args)
+
struct ss_session {
/* link us to hlr->ss_sessions */
struct llist_head list;
@@ -166,7 +169,7 @@ static void ss_session_timeout(void *data)
{
struct ss_session *ss = data;
- LOGP(DMAIN, LOGL_NOTICE, "%s/0x%08x: SS Session Timeout, destroying\n", ss->imsi, ss->session_id);
+ LOGPSS(ss, LOGL_NOTICE, "SS Session Timeout, destroying\n");
/* FIXME: should we send a ReturnError component to the MS? */
ss_session_free(ss);
}