dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/34191 )


Change subject: pcuif_proto: use confirmation flag in struct gsm_pcu_if_pch
......................................................................

pcuif_proto: use confirmation flag in struct gsm_pcu_if_pch

Use confirmed_imm_ass flag in struct gsm_pcu_if_pch instead of parsing
the received MAC block.

Related: OS#5927
Change-Id: I3364d2268bdef9c4d2feeb8e3d51a64e34bca68c
---
M include/osmo-bts/pcuif_proto.h
M src/common/pcu_sock.c
2 files changed, 17 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/91/34191/1

diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index d584ba4..951d9d7 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -230,6 +230,9 @@
        char imsi[OSMO_IMSI_BUF_SIZE];
        /* GSM mac-block (with immediate assignment message) */
        uint8_t data[GSM_MACBLOCK_LEN];
+       /* Set to true in case the MAC block contains an IMMEDIATE ASSIGNMENT 
message,
+        * for which a confirmation is required. */
+       bool confirmed_imm_ass;
 } __attribute__((packed));

 struct gsm_pcu_if {
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 2431e85..7f6016e 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -676,8 +676,6 @@
        case PCU_IF_SAPI_PCH_2:
        {
                const struct gsm_pcu_if_pch *gsm_pcu_if_pch;
-               const struct gsm48_imm_ass *gsm48_imm_ass;
-               bool confirm;

                if (OSMO_UNLIKELY(data_req->len != sizeof(*gsm_pcu_if_pch))) {
                        LOGP(DPCU, LOGL_ERROR, "Rx malformed DATA.req for 
PCH\n");
@@ -686,10 +684,8 @@
                }

                gsm_pcu_if_pch = (struct gsm_pcu_if_pch *)data_req->data;
-               gsm48_imm_ass = (struct gsm48_imm_ass *)gsm_pcu_if_pch->data;
-               confirm = (gsm48_imm_ass->msg_type == GSM48_MT_RR_IMM_ASS);
                rc = paging_add_macblock(bts->paging_state, 
gsm_pcu_if_pch->msg_id,
-                                        gsm_pcu_if_pch->imsi, confirm, 
gsm_pcu_if_pch->data);
+                                        gsm_pcu_if_pch->imsi, 
gsm_pcu_if_pch->confirmed_imm_ass, gsm_pcu_if_pch->data);
                break;
        }
        case PCU_IF_SAPI_AGCH:

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/34191
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I3364d2268bdef9c4d2feeb8e3d51a64e34bca68c
Gerrit-Change-Number: 34191
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>
Gerrit-MessageType: newchange

Reply via email to