summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-07-11 16:39:15 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2020-01-08 21:23:37 +0100
commit9b5423b5f438ecb00aa67cf131c98b745ee1c0e2 (patch)
treef12b57f061cbebd1eedecc3139785529c197b22f
parenta3cf1ff110569251ceaaab2b2ed267e7db2f8674 (diff)
debug: log xua_msg_free() callerneels/tmp_hacks
-rw-r--r--include/osmocom/sigtran/xua_msg.h6
-rw-r--r--src/xua_msg.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/include/osmocom/sigtran/xua_msg.h b/include/osmocom/sigtran/xua_msg.h
index 9c3c49c..99d3e78 100644
--- a/include/osmocom/sigtran/xua_msg.h
+++ b/include/osmocom/sigtran/xua_msg.h
@@ -73,7 +73,11 @@ void osmo_xua_msg_tall_ctx_init(void *ctx);
#define xua_msg_alloc() _xua_msg_alloc(__FILE__, __LINE__)
struct xua_msg *_xua_msg_alloc(const char *file, int line);
-void xua_msg_free(struct xua_msg *msg);
+#define xua_msg_free(msg) do { \
+ printf("xua_msg_free(): %s:%d: %p\n", __FILE__, __LINE__, msg); \
+ _xua_msg_free(msg); \
+}while(0)
+void _xua_msg_free(struct xua_msg *msg);
int xua_msg_add_data(struct xua_msg *msg, uint16_t tag, uint16_t len, uint8_t *dat);
diff --git a/src/xua_msg.c b/src/xua_msg.c
index 21c48a3..e560af4 100644
--- a/src/xua_msg.c
+++ b/src/xua_msg.c
@@ -54,7 +54,7 @@ struct xua_msg *_xua_msg_alloc(const char *file, int line)
return msg;
}
-void xua_msg_free(struct xua_msg *msg)
+void _xua_msg_free(struct xua_msg *msg)
{
talloc_free(msg);
}