aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/rsl.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-13 14:33:07 +0300
committerfixeria <vyanitskiy@sysmocom.de>2022-04-13 15:01:21 +0000
commit468c9e0a90ef57832238cdd8e10c68194b2ba900 (patch)
treedd34a4ac2b8bf342cb33d541785b6fdde3c61873 /src/common/rsl.c
parent128039a163c370f79637474de25335e23904c8fa (diff)
rsl: misc / cosmetic fixes for tx_ipac_XXcx_nack()
Diffstat (limited to 'src/common/rsl.c')
-rw-r--r--src/common/rsl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 76a4c766..30b65fc8 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2647,15 +2647,15 @@ static int rsl_tx_ipac_dlcx_nack(struct gsm_lchan *lchan, int inc_conn_id,
}
-/* transmit an CRCX NACK for the lchan */
+/* Send an xxCX NACK for the given xxCX message type and lchan */
static int tx_ipac_XXcx_nack(struct gsm_lchan *lchan, uint8_t cause,
int inc_ipport, uint8_t orig_msgtype)
{
struct msgb *msg;
uint8_t chan_nr = gsm_lchan2chan_nr_rsl(lchan);
+ uint8_t msg_type = orig_msgtype + 2;
- /* FIXME: allocate new msgb and copy old over */
- LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "RSL Tx IPAC_BIND_NACK\n");
+ LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "RSL Tx %s\n", rsl_ipac_msg_name(msg_type));
msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr));
if (!msg)
@@ -2675,7 +2675,7 @@ static int tx_ipac_XXcx_nack(struct gsm_lchan *lchan, uint8_t cause,
msgb_tlv_put(msg, RSL_IE_CAUSE, 1, &cause);
/* push the header in front */
- rsl_ipa_push_hdr(msg, orig_msgtype + 2, chan_nr);
+ rsl_ipa_push_hdr(msg, msg_type, chan_nr);
msg->trx = lchan->ts->trx;
return abis_bts_rsl_sendmsg(msg);