aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-10 04:42:25 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-10 05:09:16 +0700
commit2db8da22d63a1396d425bcefc069ebaf6994f10f (patch)
tree895eff1623a5f3e4c6689fb11666154588aea5d2
parenta73c6d67859043d68eff8410e912ee3e71163048 (diff)
pcu_sock: support handling multiple BTS instances in pcu_rx()
-rw-r--r--src/common/pcu_sock.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index efee5172..ee5f4a6b 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -812,12 +812,10 @@ static int pcu_rx(struct gsm_network *net, uint8_t msg_type,
int rc = 0;
struct gsm_bts *bts;
- /* FIXME: allow multiple BTS */
- if (pcu_prim->bts_nr != 0) {
+ if ((bts = gsm_bts_num(net, pcu_prim->bts_nr)) == NULL) {
LOGP(DPCU, LOGL_ERROR, "Received PCU Prim for non-existent BTS %u\n", pcu_prim->bts_nr);
return -EINVAL;
}
- bts = llist_entry(net->bts_list.next, struct gsm_bts, list);
switch (msg_type) {
case PCU_IF_MSG_DATA_REQ: