aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp <pmaier@sysmocom.de>2016-12-08 17:17:33 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2017-01-31 19:41:31 +0100
commit99b6a764a85d7cb7707f419228accf5304b2ac72 (patch)
treeb368f29f817bfecc6f83724b3386df8f02ca5322
parent3e1c2e66000eb6643457ae3798c6f217688aaf94 (diff)
lapd: Minor fixups
Setting n200 to 300 is a bit high. Setting it to 50 is perfectly fine, maybe even less is possible (needs to be tryed) Also added 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.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/input/lapd.c b/src/input/lapd.c
index f5909b4..eecc808 100644
--- a/src/input/lapd.c
+++ b/src/input/lapd.c
@@ -106,7 +106,7 @@ const struct lapd_profile lapd_profile_abis = {
const struct lapd_profile lapd_profile_abis_ericsson = {
.k = LAPD_SET_K(2,1),
- .n200 = 300,
+ .n200 = 50,
.n201 = 260,
.n202 = 0, /* infinite */
.t200_sec = 0, .t200_usec = 300000,
@@ -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);
}
+