aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-02-19 19:29:04 +0100
committerlaforge <laforge@osmocom.org>2021-03-01 19:44:02 +0000
commit5baa1413152fd4864a1cb1b49c8332a434e79565 (patch)
tree94d02c30f1ba092d1184b959c30de4e97ef4a1b0
parent7819ff695925ded6f6661b493c29a060802ac84a (diff)
gprs_bssgp: use BVCI_SIGNALLING/BVCI_PTM instead of 0/1
Makes more understandable and clear what's meant in the code. Related: OS#3879 Change-Id: I9d0545fac0af0dcc1783040a376a9b8e65a92699
-rw-r--r--src/gb/gprs_bssgp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index c91abd68..207c9a81 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -113,10 +113,9 @@ static int tx_bvc_reset_nsei_bvci(enum bssgp_pdu_type pdu, uint16_t nsei, uint16
OSMO_ASSERT(pdu == BSSGP_PDUT_BVC_RESET || pdu == BSSGP_PDUT_BVC_RESET_ACK);
msgb_nsei(msg) = nsei;
- msgb_bvci(msg) = 0; /* Signalling */
+ msgb_bvci(msg) = BVCI_SIGNALLING;
bgph->pdu_type = pdu;
-
msgb_tvlv_put(msg, BSSGP_IE_BVCI, 2, (uint8_t *) &_bvci);
if (pdu == BSSGP_PDUT_BVC_RESET) {
@@ -388,7 +387,7 @@ static int bssgp_rx_bvc_reset(struct msgb *msg, struct tlv_parsed *tp,
/* When we receive a BVC-RESET PDU (at least of a PTP BVCI), the BSS
* informs us about its RAC + Cell ID, so we can create a mapping */
- if (bctx->is_sgsn && bvci != 0 && bvci != 1) {
+ if (bctx->is_sgsn && bvci != BVCI_SIGNALLING && bvci != BVCI_PTM) {
if (!TLVP_PRES_LEN(tp, BSSGP_IE_CELL_ID, 8)) {
LOGP(DLBSSGP, LOGL_ERROR, "BSSGP BVCI=%u Rx RESET "
"missing mandatory IE\n", bvci);
@@ -402,7 +401,7 @@ static int bssgp_rx_bvc_reset(struct msgb *msg, struct tlv_parsed *tp,
}
/* Acknowledge the RESET to the BTS */
- if (bvci == 0 || bvci == 1 || bctx->is_sgsn)
+ if (bvci == BVCI_SIGNALLING || bvci == BVCI_PTM || bctx->is_sgsn)
bssgp_tx_simple_bvci(BSSGP_PDUT_BVC_RESET_ACK,
nsei, bvci, ns_bvci);
else