diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-09-16 17:29:51 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-09-16 19:28:38 +0200 |
commit | 666adf6a9781fced8543241dad14a65d01510858 (patch) | |
tree | e1797c8446583dff8c11814baf9793ec84b2aa5e /src | |
parent | f1222fc7243d6af0a7552b23730d7cc91c2dbb2c (diff) |
Improve logging around failing to (de)activate chan_nr
Change-Id: Ibc398eb5d50851cbe48f2c92f14e746938a68720
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bts-trx/l1_if.c | 9 | ||||
-rw-r--r-- | src/osmo-bts-virtual/l1_if.c | 8 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index 9893f455..bd3661c4 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -32,6 +32,7 @@ #include <osmocom/core/fsm.h> #include <osmocom/codec/ecu.h> #include <osmocom/gsm/abis_nm.h> +#include <osmocom/gsm/rsl.h> #include <osmo-bts/logging.h> #include <osmo-bts/bts.h> @@ -453,8 +454,8 @@ int bts_model_l1sap_down(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap) lchan = get_lchan_by_chan_nr(trx, chan_nr); if (l1sap->u.info.type == PRIM_INFO_ACTIVATE) { if ((chan_nr & 0xE0) == 0x80) { - LOGP(DL1C, LOGL_ERROR, "Cannot activate" - " chan_nr 0x%02x\n", chan_nr); + LOGPLCHAN(lchan, DL1C, LOGL_ERROR, "Cannot activate" + " channel %s\n", rsl_chan_nr_str(chan_nr)); break; } @@ -524,8 +525,8 @@ int bts_model_l1sap_down(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap) } /* here, type == PRIM_INFO_DEACTIVATE */ if ((chan_nr & 0xE0) == 0x80) { - LOGP(DL1C, LOGL_ERROR, "Cannot deactivate " - "chan_nr 0x%02x\n", chan_nr); + LOGPLCHAN(lchan, DL1C, LOGL_ERROR, "Cannot deactivate" + " channel %s\n", rsl_chan_nr_str(chan_nr)); break; } /* clear ECU state (if any) */ diff --git a/src/osmo-bts-virtual/l1_if.c b/src/osmo-bts-virtual/l1_if.c index 8e84579f..ed3b6019 100644 --- a/src/osmo-bts-virtual/l1_if.c +++ b/src/osmo-bts-virtual/l1_if.c @@ -383,8 +383,8 @@ int bts_model_l1sap_down(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap) * e.g. as a response to a channel req on RACH */ if (l1sap->u.info.type == PRIM_INFO_ACTIVATE) { if ((chan_nr & 0xE0) == 0x80) { - LOGP(DL1C, LOGL_ERROR, "Cannot activate" - " chan_nr 0x%02x\n", chan_nr); + LOGPLCHAN(lchan, DL1C, LOGL_ERROR, "Cannot activate" + " channel %s\n", rsl_chan_nr_str(chan_nr)); break; } /* activate dedicated channel */ @@ -432,8 +432,8 @@ int bts_model_l1sap_down(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap) break; } if ((chan_nr & 0xE0) == 0x80) { - LOGP(DL1C, LOGL_ERROR, "Cannot deactivate " - "chan_nr 0x%02x\n", chan_nr); + LOGPLCHAN(lchan, DL1C, LOGL_ERROR, "Cannot deactivate" + " channel %s\n", rsl_chan_nr_str(chan_nr)); break; } /* deactivate associated channel */ |