diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-05-04 22:55:33 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-06-08 16:16:42 +0000 |
commit | 57f32626e33ab710788192dd2254d59eb872d4a9 (patch) | |
tree | c46f06473303fb3924d237af71ab61bb0149649e | |
parent | 0935546b2b30ead6183b6fde2f324f118e657125 (diff) |
log: fix logging in rsl_rx_chan_act_nack()
In each code path within rsl_rx_chan_act_nack(), do separate logging of the
NACK to ensure proper termination of each log line.
When receiving a Chan Act NACK, we possibly mixed a LOGP() within an
unterminated other LOGP() that had not been ended with a LOGPC() yet.
Change-Id: Icd2772b21ef3a2ff5af11b7c92dff0ecb4d87ff0
-rw-r--r-- | src/osmo-bsc/abis_rsl.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 7bbde47d7..60b836d31 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1328,18 +1328,21 @@ static int rsl_rx_chan_act_nack(struct msgb *msg) return -1; } - LOGP(DRSL, LOGL_ERROR, "%s CHANNEL ACTIVATE NACK ", - gsm_lchan_name(msg->lchan)); - /* BTS has rejected channel activation ?!? */ - if (dh->ie_chan != RSL_IE_CHAN_NR) + if (dh->ie_chan != RSL_IE_CHAN_NR) { + LOGP(DRSL, LOGL_ERROR, "%s CHANNEL ACTIVATE NACK, and chan nr mismatches\n", + gsm_lchan_name(msg->lchan)); return -EINVAL; + } rsl_tlv_parse(&tp, dh->data, msgb_l2len(msg)-sizeof(*dh)); if (TLVP_PRESENT(&tp, RSL_IE_CAUSE)) { const uint8_t *cause = TLVP_VAL(&tp, RSL_IE_CAUSE); + LOGP(DRSL, LOGL_ERROR, "%s CHANNEL ACTIVATE NACK: ", + gsm_lchan_name(msg->lchan)); print_rsl_cause(LOGL_ERROR, cause, TLVP_LEN(&tp, RSL_IE_CAUSE)); + LOGPC(DRSL, LOGL_ERROR, "\n"); msg->lchan->error_cause = *cause; if (*cause != RSL_ERR_RCH_ALR_ACTV_ALLOC) { rsl_lchan_mark_broken(msg->lchan, "NACK on activation"); @@ -1347,11 +1350,11 @@ static int rsl_rx_chan_act_nack(struct msgb *msg) rsl_rf_chan_release(msg->lchan, 1, SACCH_DEACTIVATE); } else { + LOGP(DRSL, LOGL_ERROR, "%s CHANNEL ACTIVATE NACK, no cause IE\n", + gsm_lchan_name(msg->lchan)); rsl_lchan_mark_broken(msg->lchan, "NACK on activation no IE"); } - LOGPC(DRSL, LOGL_ERROR, "\n"); - send_lchan_signal(S_LCHAN_ACTIVATE_NACK, msg->lchan, NULL); return 0; } |