dexter has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/31168 )
Change subject: pcu_sock: use extract_paging_group() for PCU_IF_SAPI_PCH
......................................................................
pcu_sock: use extract_paging_group() for PCU_IF_SAPI_PCH
We have introduced the function extract_paging_group() with the previous
patch. Lets use it for PCU_IF_SAPI_PCH as well to remove code
duplication
Change-Id: If4ffe8eafd2e54e323cbc075c09d457a74ebe83f
Related: OS#5198
---
M src/osmo-bsc/pcu_sock.c
1 file changed, 4 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/68/31168/1
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index c2487dd..31403f5 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -428,7 +428,6 @@
struct gsm_pcu_if_data *data_req)
{
struct msgb *msg;
- char imsi_digit_buf[4];
uint32_t tlli = -1;
uint8_t pag_grp;
int rc = 0;
@@ -440,15 +439,10 @@
switch (data_req->sapi) {
case PCU_IF_SAPI_PCH:
- /* the first three bytes are the last three digits of
- * the IMSI, which we need to compute the paging group */
- imsi_digit_buf[0] = data_req->data[0];
- imsi_digit_buf[1] = data_req->data[1];
- imsi_digit_buf[2] = data_req->data[2];
- imsi_digit_buf[3] = '\0';
- LOGP(DPCU, LOGL_DEBUG, "SAPI PCH imsi %s\n", imsi_digit_buf);
- pag_grp = gsm0502_calc_paging_group(&bts->si_common.chan_desc,
- str_to_imsi(imsi_digit_buf));
+ /* Extract 3 byte paging group */
+ pag_grp = extract_paging_group(bts, data_req->data);
+
+ LOGP(DPCU, LOGL_DEBUG, "PCU Sends immediate assignment via AGCH
(pag_grp=0x%02x)\n", pag_grp);
pcu_rx_rr_paging(bts, pag_grp, data_req->data+3);
break;
case PCU_IF_SAPI_AGCH:
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/31168
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If4ffe8eafd2e54e323cbc075c09d457a74ebe83f
Gerrit-Change-Number: 31168
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange