aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2016-12-08 17:17:33 +0100
committerHarald Welte <laforge@gnumonks.org>2017-03-15 13:00:24 +0000
commit027e11936385a38bd331ea29f4f47a7b443c0932 (patch)
tree3bbf7bbeebbdd4f5a2e793e0939bf0c6ff86e12c
parentd75bac40d1b51a702cd14b35add6ff51d38d3994 (diff)
lapd: log pointer addresses
Add pointer address output to the sap alloc/free functions in order to track the objects later in the debug output (we have three of them) Change-Id: I9b961d5e36967cfd953551b24696849541257a1c
-rw-r--r--src/input/lapd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/input/lapd.c b/src/input/lapd.c
index 370697d..4b5077b 100644
--- a/src/input/lapd.c
+++ b/src/input/lapd.c
@@ -229,8 +229,9 @@ static struct lapd_sap *lapd_sap_alloc(struct lapd_tei *teip, uint8_t sapi)
if (!sap)
return NULL;
- LOGP(DLLAPD, LOGL_NOTICE, "LAPD Allocating SAP for SAPI=%u / TEI=%u\n",
- sapi, teip->tei);
+ LOGP(DLLAPD, LOGL_NOTICE,
+ "LAPD Allocating SAP for SAPI=%u / TEI=%u (dl=%p, sap=%p)\n",
+ sapi, teip->tei, &sap->dl, sap);
sap->sapi = sapi;
sap->tei = teip;
@@ -266,6 +267,10 @@ static struct lapd_sap *lapd_sap_alloc(struct lapd_tei *teip, uint8_t sapi)
/* Free SAP instance, including the datalink */
static void lapd_sap_free(struct lapd_sap *sap)
{
+ LOGP(DLLAPD, LOGL_NOTICE,
+ "LAPD Freeing SAP for SAPI=%u / TEI=%u (dl=%p, sap=%p)\n",
+ sap->sapi, sap->tei->tei, &sap->dl, sap);
+
/* free datalink structures and timers */
lapd_dl_exit(&sap->dl);