aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_ms.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-10-21 15:00:08 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2022-10-21 19:09:23 +0200
commit3547d64061be3c62473780a3cffed9536e027d46 (patch)
tree300da81ed89a42fe665619946074431c3a3c4817 /src/gprs_ms.h
parent7f360e74b702cc2bb76290754183406b4f617b2f (diff)
gprs_ms: Move creating string name of object to a function
This way it can be used outside of LOGPMS(). Change-Id: I8ab713154c8f308878f3e85b6f7e8afc5c4be249
Diffstat (limited to 'src/gprs_ms.h')
-rw-r--r--src/gprs_ms.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gprs_ms.h b/src/gprs_ms.h
index c5ee01c9..cc92e2ab 100644
--- a/src/gprs_ms.h
+++ b/src/gprs_ms.h
@@ -134,6 +134,8 @@ struct gprs_rlcmac_tbf *ms_tbf(const struct GprsMs *ms, enum gprs_rlcmac_tbf_dir
static inline struct gprs_rlcmac_ul_tbf *ms_ul_tbf(const struct GprsMs *ms) {return ms->ul_tbf;}
static inline struct gprs_rlcmac_dl_tbf *ms_dl_tbf(const struct GprsMs *ms) {return ms->dl_tbf;}
+const char *ms_name(const struct GprsMs *ms);
+char *ms_name_buf(const struct GprsMs *ms, char *buf, unsigned int buf_size);
void ms_set_callback(struct GprsMs *ms, struct gpr_ms_callback *cb);
@@ -237,11 +239,7 @@ static inline struct gprs_rlcmac_trx *ms_current_trx(const struct GprsMs *ms)
}
#define LOGPMS(ms, category, level, fmt, args...) \
- LOGP(category, level, "MS(TLLI=0x%08x, IMSI=%s, TA=%" PRIu8 ", %" PRIu8 "/%" PRIu8 ",%s%s) " fmt, \
- ms_tlli(ms), ms_imsi(ms), ms_ta(ms), ms_ms_class(ms), ms_egprs_ms_class(ms), \
- ms_ul_tbf(ms) ? " UL": "", \
- ms_dl_tbf(ms) ? " DL": "", \
- ## args)
+ LOGP(category, level, "%s " fmt, ms_name(ms), ## args)
#ifdef __cplusplus
}