pcu_l1_if: Fix erroneous endian-swapping of the CellID

In Change-Id I787fed84a7b613158a5618dd5cffafe4e4927234 in February 2018
we accidentially introduced a change that would erroneously swap
the endianness of the CellID on the way between PCUIF socket and
BSGSP.  This meant that all OsmoPCU based BTSs would report the
wrong CellId to the SGSN.

Closes: OS#3854
Change-Id: I2f6cc930c5dbf8dac386b24b0756df2efe8199e4
This commit is contained in:
Harald Welte 2019-03-21 19:48:55 +01:00
parent 8a8e0fb267
commit 1473b377c2
1 changed files with 2 additions and 3 deletions

View File

@ -414,7 +414,6 @@ static int pcu_rx_info_ind(struct gsm_pcu_if_info_ind *info_ind)
int rc = 0;
unsigned int trx, ts;
int i;
uint16_t cell_id = ntohs(info_ind->cell_id);
if (info_ind->version != PCU_IF_VERSION) {
fprintf(stderr, "PCU interface version number of BTS (%d) is "
@ -445,7 +444,7 @@ bssgp_failed:
LOGP(DL1IF, LOGL_DEBUG, " mnc=%0*u\n", info_ind->mnc_3_digits, info_ind->mnc);
LOGP(DL1IF, LOGL_DEBUG, " lac=%d\n", info_ind->lac);
LOGP(DL1IF, LOGL_DEBUG, " rac=%d\n", info_ind->rac);
LOGP(DL1IF, LOGL_DEBUG, " cell_id=%d\n", cell_id);
LOGP(DL1IF, LOGL_DEBUG, " cell_id=%d\n", info_ind->cell_id);
LOGP(DL1IF, LOGL_DEBUG, " bsic=%d\n", info_ind->bsic);
LOGP(DL1IF, LOGL_DEBUG, " nsei=%d\n", info_ind->nsei);
LOGP(DL1IF, LOGL_DEBUG, " nse_timer=%d %d %d %d %d %d %d\n",
@ -496,7 +495,7 @@ bssgp_failed:
info_ind->remote_ip[0], info_ind->remote_port[0],
info_ind->nsei, info_ind->nsvci[0], info_ind->bvci,
info_ind->mcc, info_ind->mnc, info_ind->mnc_3_digits, info_ind->lac, info_ind->rac,
cell_id);
info_ind->cell_id);
if (!pcu) {
LOGP(DL1IF, LOGL_NOTICE, "SGSN not available\n");
goto bssgp_failed;