jolly has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/33446 )

Change subject: ASCI: Add decoding of mobile identity in TALKER INDICATION
......................................................................

ASCI: Add decoding of mobile identity in TALKER INDICATION

gsm48.c provides a function to decode mobile identity from various
messages. TALKER INDICATION is sent by the talking subscriber of a voice
group call to idenitfy the current talker. The mobile identity is
required to distinguish between calling subscriber and other subscribers.

Related: OS#4854
Change-Id: I331fac82e3c15abb01f554b2e70576100f2eea2d
---
M src/gsm/gsm48.c
1 file changed, 26 insertions(+), 0 deletions(-)

Approvals:
  fixeria: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index 3ec7547..4f79026 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -955,6 +955,17 @@
                        cm2_buf = (uint8_t*)&paging_response->cm2;
                        goto got_cm2;

+               case GSM48_MT_RR_TALKER_IND:
+                       /* Check minimum size: Header + CM2 LV + minimum MI LV 
*/
+                       if (l3_len < sizeof(*gh) + 4 + 2)
+                               return -EBADMSG;
+                       /* CM2 shall be always 3 bytes in length */
+                       if (gh->data[0] != 3)
+                               return -EBADMSG;
+                       cm2_len = gh->data[0];
+                       cm2_buf = gh->data + 1;
+                       goto got_cm2;
+
                default:
                        break;
                }

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I331fac82e3c15abb01f554b2e70576100f2eea2d
Gerrit-Change-Number: 33446
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: jolly <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to