[S] Change in osmocom-bb[master]: ASCI: Use correct mobile identiy in TALKER INDICATION message

2023-10-28 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34865?usp=email )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: ASCI: Use correct mobile identiy in TALKER INDICATION message
..

ASCI: Use correct mobile identiy in TALKER INDICATION message

Use TMSI only if valid in the current location area. If the MS moves to
a different location area and joins a group call before location update,
TMSI is not valid. Then use IMSI instead. If no IMSI/TSMI is available,
send mobile identity without IMSI/TMSI.

Change-Id: I299604a0e12d91e9133b70757826ac9637da0e3e
Related: OS#5364
---
M src/host/layer23/src/mobile/gsm48_rr.c
1 file changed, 29 insertions(+), 2 deletions(-)

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




diff --git a/src/host/layer23/src/mobile/gsm48_rr.c 
b/src/host/layer23/src/mobile/gsm48_rr.c
index 3200412..b898090 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -2085,6 +2085,8 @@
 static int gsm48_rr_tx_talker_indication(struct osmocom_ms *ms)
 {
struct gsm48_rrlayer *rr = >rrlayer;
+   struct gsm_subscriber *subscr = >subscr;
+   struct gsm322_cellsel *cs = >cellsel;
struct msgb *nmsg;
struct gsm48_hdr *gh;
struct gsm48_talker_indication *ti;
@@ -2103,8 +2105,18 @@
/* classmark 2 */
ti->cm2_len = sizeof(ti->cm2);
gsm48_rr_enc_cm2(ms, >cm2, rr->cd_now.arfcn);
-   /* mobile identity (Use TMSI if available.) */
-   gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_TMSI, false);
+
+   /* mobile identity */
+   if (ms->subscr.tmsi != GSM_RESERVED_TMSI && (osmo_lai_cmp(>lai, 
>sel_cgi.lai) == 0)) {
+   gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_TMSI, false);
+   LOGP(DRR, LOGL_INFO, "Sending TALKER INDICATION with TMSI.\n");
+   } else if (subscr->imsi[0]) {
+   gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_IMSI, false);
+   LOGP(DRR, LOGL_INFO, "Sending TALKER INDICATION with IMSI.\n");
+   } else {
+   gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_NONE, false);
+   LOGP(DRR, LOGL_INFO, "Sending TALKER INDICATION without 
TMSI/IMSI.\n");
+   }

/* start establishmnet */
return gsm48_send_rsl(ms, RSL_MT_EST_REQ, nmsg, 0);

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34865?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I299604a0e12d91e9133b70757826ac9637da0e3e
Gerrit-Change-Number: 34865
Gerrit-PatchSet: 2
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmocom-bb[master]: ASCI: Use correct mobile identiy in TALKER INDICATION message

2023-10-27 Thread jolly
Attention is currently required from: jolly.

Hello Jenkins Builder, fixeria, pespin,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmocom-bb/+/34865?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder

The change is no longer submittable: Verified is unsatisfied now.


Change subject: ASCI: Use correct mobile identiy in TALKER INDICATION message
..

ASCI: Use correct mobile identiy in TALKER INDICATION message

Use TMSI only if valid in the current location area. If the MS moves to
a different location area and joins a group call before location update,
TMSI is not valid. Then use IMSI instead. If no IMSI/TSMI is available,
send mobile identity without IMSI/TMSI.

Change-Id: I299604a0e12d91e9133b70757826ac9637da0e3e
Related: OS#5364
---
M src/host/layer23/src/mobile/gsm48_rr.c
1 file changed, 29 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/65/34865/2
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34865?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I299604a0e12d91e9133b70757826ac9637da0e3e
Gerrit-Change-Number: 34865
Gerrit-PatchSet: 2
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-MessageType: newpatchset


[S] Change in osmocom-bb[master]: ASCI: Use correct mobile identiy in TALKER INDICATION message

2023-10-23 Thread pespin
Attention is currently required from: jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34865?usp=email )

Change subject: ASCI: Use correct mobile identiy in TALKER INDICATION message
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34865?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I299604a0e12d91e9133b70757826ac9637da0e3e
Gerrit-Change-Number: 34865
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Mon, 23 Oct 2023 14:42:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmocom-bb[master]: ASCI: Use correct mobile identiy in TALKER INDICATION message

2023-10-23 Thread fixeria
Attention is currently required from: jolly.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34865?usp=email )

Change subject: ASCI: Use correct mobile identiy in TALKER INDICATION message
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34865?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I299604a0e12d91e9133b70757826ac9637da0e3e
Gerrit-Change-Number: 34865
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Mon, 23 Oct 2023 13:12:15 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmocom-bb[master]: ASCI: Use correct mobile identiy in TALKER INDICATION message

2023-10-23 Thread jolly
jolly has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34865?usp=email )


Change subject: ASCI: Use correct mobile identiy in TALKER INDICATION message
..

ASCI: Use correct mobile identiy in TALKER INDICATION message

Use TMSI only if valid in the current location area. If the MS moves to
a different location area and joins a group call before location update,
TMSI is not valid. Then use IMSI instead. If no IMSI/TSMI is available,
send mobile identity without IMSI/TMSI.

Change-Id: I299604a0e12d91e9133b70757826ac9637da0e3e
Related: OS#5364
---
M src/host/layer23/src/mobile/gsm48_rr.c
1 file changed, 29 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/65/34865/1

diff --git a/src/host/layer23/src/mobile/gsm48_rr.c 
b/src/host/layer23/src/mobile/gsm48_rr.c
index 3200412..b898090 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -2085,6 +2085,8 @@
 static int gsm48_rr_tx_talker_indication(struct osmocom_ms *ms)
 {
struct gsm48_rrlayer *rr = >rrlayer;
+   struct gsm_subscriber *subscr = >subscr;
+   struct gsm322_cellsel *cs = >cellsel;
struct msgb *nmsg;
struct gsm48_hdr *gh;
struct gsm48_talker_indication *ti;
@@ -2103,8 +2105,18 @@
/* classmark 2 */
ti->cm2_len = sizeof(ti->cm2);
gsm48_rr_enc_cm2(ms, >cm2, rr->cd_now.arfcn);
-   /* mobile identity (Use TMSI if available.) */
-   gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_TMSI, false);
+
+   /* mobile identity */
+   if (ms->subscr.tmsi != GSM_RESERVED_TMSI && (osmo_lai_cmp(>lai, 
>sel_cgi.lai) == 0)) {
+   gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_TMSI, false);
+   LOGP(DRR, LOGL_INFO, "Sending TALKER INDICATION with TMSI.\n");
+   } else if (subscr->imsi[0]) {
+   gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_IMSI, false);
+   LOGP(DRR, LOGL_INFO, "Sending TALKER INDICATION with IMSI.\n");
+   } else {
+   gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_NONE, false);
+   LOGP(DRR, LOGL_INFO, "Sending TALKER INDICATION without 
TMSI/IMSI.\n");
+   }

/* start establishmnet */
return gsm48_send_rsl(ms, RSL_MT_EST_REQ, nmsg, 0);

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34865?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I299604a0e12d91e9133b70757826ac9637da0e3e
Gerrit-Change-Number: 34865
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-MessageType: newchange