summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-07-11 16:39:15 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-07-12 05:26:08 +0200
commite9d0296e2fc52e9f7468361d8c49285796ca3ac4 (patch)
tree7410235d021b2a49c46238bef06fe777f3c07471
parent55381f9fb62e9affaddfad250449c6d840224f0f (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 a3b64d2..c9ccc8c 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);
}