diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2016-12-08 17:17:33 +0100 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2017-02-15 17:52:15 +0100 |
commit | b4ebdd61a880731bf4d9c160c39d04608ba8aba9 (patch) | |
tree | 0e7d3c89c34a7d7b37adb59b8dc9120a31c6d152 | |
parent | unixsocket: make socket connection fault tolerant (diff) | |
download | libosmo-abis-b4ebdd61a880731bf4d9c160c39d04608ba8aba9.tar.xz libosmo-abis-b4ebdd61a880731bf4d9c160c39d04608ba8aba9.zip |
lapd: Improve log output
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)
-rw-r--r-- | src/input/lapd.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/input/lapd.c b/src/input/lapd.c index f5909b4..344ef46 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); @@ -703,3 +708,4 @@ void lapd_instance_free(struct lapd_instance *li) talloc_free(li); } + |