aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/bts.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-05-02 21:31:07 +0200
committerHarald Welte <laforge@osmocom.org>2020-06-07 22:31:19 +0200
commita003fec7cdcbb0de46c145f768a0a76710b561b7 (patch)
treeceac055f77c6ff691129c8e58e7a7dcbd3b53790 /src/common/bts.c
parentfe8f13ace32fb30b41be6b0a065a031be16be154 (diff)
Ensure we include lchan name in all LAPDm log lines
This makes use of the newly-introduced lapdm_channel_init3() API, which provides the user (BTS in this case) to provide a human-readable string identifier for each LAPDm channel. This identifier is subsequently used in all related log lines to provide context. This means we will now get context information about which specific SAPI in which sub-channel (ACCH/DCCH) on which lchan/ts/trx/bts a given message originated from. Example: DLLAPD <0011> lapd_core.c:829 ((bts=0,trx=0,ts=0,ss=0)[DCCH][0]) SABM(E) received in state LAPD_STATE_IDLE Change-Id: I17e3d4797ec71e31d0775330ae36d2e1fd70423f Depends: libosmocore.git Ie6742843fff809edffcac24c4dce4edf66bc71be Related: OS#1938
Diffstat (limited to 'src/common/bts.c')
-rw-r--r--src/common/bts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/bts.c b/src/common/bts.c
index 22006156..9710a2ce 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -429,7 +429,8 @@ int lchan_init_lapdm(struct gsm_lchan *lchan)
"Setting T200 D0=%u, D3=%u, S0=%u, S3=%u (all in ms)\n",
t200_ms_dcch[DL_SAPI0], t200_ms_dcch[DL_SAPI3],
t200_ms_acch[DL_SAPI0], t200_ms_acch[DL_SAPI3]);
- lapdm_channel_init2(lc, LAPDM_MODE_BTS, t200_ms_dcch, t200_ms_acch, lchan->type);
+ lapdm_channel_init3(lc, LAPDM_MODE_BTS, t200_ms_dcch, t200_ms_acch, lchan->type,
+ gsm_lchan_name(lchan));
lapdm_channel_set_flags(lc, LAPDM_ENT_F_POLLING_ONLY);
lapdm_channel_set_l1(lc, NULL, lchan);
}