aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2022-08-01 22:50:52 +0700
committerMax <msuraev@sysmocom.de>2022-08-05 22:12:09 +0700
commit62977d048487837f73f4eb9dfcfeb0be194050b0 (patch)
tree4194eb9f1735fb6381ebff71eb9451c445100eba /include
parent5346f69a543eab087380be117d625bbaf82ebd4b (diff)
Add ESME-specific logging
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/smpp/smpp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/osmocom/smpp/smpp.h b/include/osmocom/smpp/smpp.h
index cc0e8003a..df5e163c0 100644
--- a/include/osmocom/smpp/smpp.h
+++ b/include/osmocom/smpp/smpp.h
@@ -11,6 +11,12 @@ enum esme_read_state {
READ_ST_IN_MSG = 1,
};
+#define LOGPESME(ESME, LEVEL, FMT, ARGS...) \
+ LOGP(DSMPP, LEVEL, "[%s] " FMT, (ESME)->system_id, ##ARGS)
+
+#define LOGPESMERR(ESME, FMT, ARGS...) \
+ LOGPESME(ESME, LOGL_ERROR, "Error (%s) " FMT, smpp34_strerror, ##ARGS)
+
/*! \brief Ugly wrapper. libsmpp34 should do this itself! */
#define SMPP34_UNPACK(rc, type, str, data, len) { \
memset(str, 0, sizeof(*str)); \