From 0d4a98ae24eb0369605cce857284343e52de8df2 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Tue, 25 Sep 2018 13:18:08 +0200 Subject: lcls: log channel type and lchan names on LCLS codec mismatch When a codec mismatch (lchan type or tch_mode does not match) occurs, we do not know which of the two lchan had which type or tch_mode. Lets print that information as well to make debugging easier. Change-Id: I3fd22fef50d8944ca8c003c6114fdda37417b2ea Related: OS#1602 --- src/osmo-bsc/osmo_bsc_lcls.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c index 00c329683..b8bf60103 100644 --- a/src/osmo-bsc/osmo_bsc_lcls.c +++ b/src/osmo-bsc/osmo_bsc_lcls.c @@ -276,13 +276,24 @@ static bool lcls_enable_possible(struct gsm_subscriber_connection *conn) if (conn->lchan->type != conn->lcls.other->lchan->type && conn->sccp.msc->lcls_codec_mismatch_allow == false) { - LOGPFSM(conn->lcls.fi, "Not enabling LS due to codec mismatch (channel type)\n"); + LOGPFSM(conn->lcls.fi, + "Not enabling LS due to channel type mismatch: %s:%s != %s:%s\n", + gsm_lchan_name(conn->lchan), + gsm_chan_t_name(conn->lchan->type), + gsm_lchan_name(conn->lcls.other->lchan), + gsm_chan_t_name(conn->lcls.other->lchan->type)); return false; } if (conn->lchan->tch_mode != conn->lcls.other->lchan->tch_mode && conn->sccp.msc->lcls_codec_mismatch_allow == false) { - LOGPFSM(conn->lcls.fi, "Not enabling LS due to codec mismatch (TCH-Mode)\n"); + LOGPFSM(conn->lcls.fi, + "Not enabling LS due to TCH-mode mismatch: %s:%s != %s:%s\n", + gsm_lchan_name(conn->lchan), + gsm48_chan_mode_name(conn->lchan->tch_mode), + gsm_lchan_name(conn->lcls.other->lchan), + gsm48_chan_mode_name(conn->lcls.other->lchan-> + tch_mode)); return false; } -- cgit v1.2.3