[XS] Change in osmo-tetra[master]: Fix preventing crashes when -d missing

2025-12-18 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-tetra/+/41679?usp=email )

Change subject: Fix preventing crashes when -d missing
..

Fix preventing crashes when -d missing

Small fix that check whether a dumpdir was provided with -d. If not,
no voice data is written to file.

Change-Id: I6a857f62aae542b054cbb474594359da626762bb
---
M src/lower_mac/tetra_lower_mac.c
1 file changed, 5 insertions(+), 2 deletions(-)

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




diff --git a/src/lower_mac/tetra_lower_mac.c b/src/lower_mac/tetra_lower_mac.c
index f8e7810..d58f2ab 100644
--- a/src/lower_mac/tetra_lower_mac.c
+++ b/src/lower_mac/tetra_lower_mac.c
@@ -194,8 +194,11 @@
if (tms->cur_burst.is_traffic && type == TPSAP_T_NDB && blk_num == 
BLK_1)
tms->cur_burst.blk1_stolen = true;

-   /* If this is a traffic channel, dump. */
-   if (tms->cur_burst.is_traffic && (type == TPSAP_T_SCH_F || (blk_num == 
BLK_2 && !tms->cur_burst.blk2_stolen))) {
+   /* If this is a traffic channel and we have a dump output directory, 
dump. */
+   if (tms->dumpdir &&
+   tms->cur_burst.is_traffic &&
+   (type == TPSAP_T_SCH_F || (blk_num == BLK_2 && 
!tms->cur_burst.blk2_stolen))) {
+
char fname[PATH_MAX];
int16_t block[690];
FILE *f;

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

Gerrit-MessageType: merged
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I6a857f62aae542b054cbb474594359da626762bb
Gerrit-Change-Number: 41679
Gerrit-PatchSet: 3
Gerrit-Owner: wbokslag 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 


[XS] Change in osmo-tetra[master]: Fix preventing crashes when -d missing

2025-12-18 Thread laforge
Attention is currently required from: wbokslag.

laforge has posted comments on this change by wbokslag. ( 
https://gerrit.osmocom.org/c/osmo-tetra/+/41679?usp=email )

Change subject: Fix preventing crashes when -d missing
..


Patch Set 3: Code-Review+2


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

Gerrit-MessageType: comment
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I6a857f62aae542b054cbb474594359da626762bb
Gerrit-Change-Number: 41679
Gerrit-PatchSet: 3
Gerrit-Owner: wbokslag 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: wbokslag 
Gerrit-Comment-Date: Thu, 18 Dec 2025 19:47:49 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes


[XS] Change in osmo-tetra[master]: Fix preventing crashes when -d missing

2025-12-16 Thread pespin
Attention is currently required from: wbokslag.

pespin has posted comments on this change by wbokslag. ( 
https://gerrit.osmocom.org/c/osmo-tetra/+/41679?usp=email )

Change subject: Fix preventing crashes when -d missing
..


Patch Set 3: Code-Review+1


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

Gerrit-MessageType: comment
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I6a857f62aae542b054cbb474594359da626762bb
Gerrit-Change-Number: 41679
Gerrit-PatchSet: 3
Gerrit-Owner: wbokslag 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: wbokslag 
Gerrit-Comment-Date: Tue, 16 Dec 2025 16:29:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes


[XS] Change in osmo-tetra[master]: Fix preventing crashes when -d missing

2025-12-16 Thread wbokslag
Attention is currently required from: pespin.

wbokslag has posted comments on this change by wbokslag. ( 
https://gerrit.osmocom.org/c/osmo-tetra/+/41679?usp=email )

Change subject: Fix preventing crashes when -d missing
..


Patch Set 3:

(1 comment)

File src/lower_mac/tetra_lower_mac.c:

https://gerrit.osmocom.org/c/osmo-tetra/+/41679/comment/48702c11_812e0919?usp=email
 :
PS1, Line 198:  if (tms->cur_burst.is_traffic && (type == TPSAP_T_SCH_F || 
(blk_num == BLK_2 && !tms->cur_burst.blk2_stolen)) && tms->dumpdir) {
> It may also make sense to check tms->dumpdir first.
Acknowledged



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

Gerrit-MessageType: comment
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I6a857f62aae542b054cbb474594359da626762bb
Gerrit-Change-Number: 41679
Gerrit-PatchSet: 3
Gerrit-Owner: wbokslag 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 16 Dec 2025 15:46:48 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 


[XS] Change in osmo-tetra[master]: Fix preventing crashes when -d missing

2025-12-16 Thread wbokslag
Attention is currently required from: pespin.

wbokslag has posted comments on this change by wbokslag. ( 
https://gerrit.osmocom.org/c/osmo-tetra/+/41679?usp=email )

Change subject: Fix preventing crashes when -d missing
..


Patch Set 3:

(1 comment)

File src/lower_mac/tetra_lower_mac.c:

https://gerrit.osmocom.org/c/osmo-tetra/+/41679/comment/93f9fbfd_cd92ede5?usp=email
 :
PS2, Line 199:  tms->cur_burst.is_traffic &&
> wrong indentation, please align with previous line condition.
Thanks for the quick review. I was a bit too fast with the second patch set, 
should be fixed now.



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

Gerrit-MessageType: comment
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I6a857f62aae542b054cbb474594359da626762bb
Gerrit-Change-Number: 41679
Gerrit-PatchSet: 3
Gerrit-Owner: wbokslag 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 16 Dec 2025 15:45:26 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 


[XS] Change in osmo-tetra[master]: Fix preventing crashes when -d missing

2025-12-16 Thread wbokslag
Attention is currently required from: wbokslag.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-tetra/+/41679?usp=email

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

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


Change subject: Fix preventing crashes when -d missing
..

Fix preventing crashes when -d missing

Small fix that check whether a dumpdir was provided with -d. If not,
no voice data is written to file.

Change-Id: I6a857f62aae542b054cbb474594359da626762bb
---
M src/lower_mac/tetra_lower_mac.c
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-tetra refs/changes/79/41679/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/41679?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I6a857f62aae542b054cbb474594359da626762bb
Gerrit-Change-Number: 41679
Gerrit-PatchSet: 3
Gerrit-Owner: wbokslag 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: wbokslag 


[XS] Change in osmo-tetra[master]: Fix preventing crashes when -d missing

2025-12-16 Thread pespin
Attention is currently required from: wbokslag.

pespin has posted comments on this change by wbokslag. ( 
https://gerrit.osmocom.org/c/osmo-tetra/+/41679?usp=email )

Change subject: Fix preventing crashes when -d missing
..


Patch Set 2:

(1 comment)

File src/lower_mac/tetra_lower_mac.c:

https://gerrit.osmocom.org/c/osmo-tetra/+/41679/comment/54917254_9302c29f?usp=email
 :
PS2, Line 199:  tms->cur_burst.is_traffic &&
wrong indentation, please align with previous line condition.



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

Gerrit-MessageType: comment
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I6a857f62aae542b054cbb474594359da626762bb
Gerrit-Change-Number: 41679
Gerrit-PatchSet: 2
Gerrit-Owner: wbokslag 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: wbokslag 
Gerrit-Comment-Date: Tue, 16 Dec 2025 15:17:15 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No


[XS] Change in osmo-tetra[master]: Fix preventing crashes when -d missing

2025-12-16 Thread wbokslag
Attention is currently required from: wbokslag.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-tetra/+/41679?usp=email

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

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


Change subject: Fix preventing crashes when -d missing
..

Fix preventing crashes when -d missing

Small fix that check whether a dumpdir was provided with -d. If not,
no voice data is written to file.

Change-Id: I6a857f62aae542b054cbb474594359da626762bb
---
M src/lower_mac/tetra_lower_mac.c
1 file changed, 5 insertions(+), 2 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I6a857f62aae542b054cbb474594359da626762bb
Gerrit-Change-Number: 41679
Gerrit-PatchSet: 2
Gerrit-Owner: wbokslag 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: wbokslag 


[XS] Change in osmo-tetra[master]: Fix preventing crashes when -d missing

2025-12-16 Thread pespin
Attention is currently required from: wbokslag.

pespin has posted comments on this change by wbokslag. ( 
https://gerrit.osmocom.org/c/osmo-tetra/+/41679?usp=email )

Change subject: Fix preventing crashes when -d missing
..


Patch Set 1:

(1 comment)

File src/lower_mac/tetra_lower_mac.c:

https://gerrit.osmocom.org/c/osmo-tetra/+/41679/comment/a8b6272c_225f8e7b?usp=email
 :
PS1, Line 198:  if (tms->cur_burst.is_traffic && (type == TPSAP_T_SCH_F || 
(blk_num == BLK_2 && !tms->cur_burst.blk2_stolen)) && tms->dumpdir) {
> line too large, I'd say put every condition between && in a new line.
It may also make sense to check tms->dumpdir first.



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

Gerrit-MessageType: comment
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I6a857f62aae542b054cbb474594359da626762bb
Gerrit-Change-Number: 41679
Gerrit-PatchSet: 1
Gerrit-Owner: wbokslag 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: wbokslag 
Gerrit-Comment-Date: Tue, 16 Dec 2025 14:57:21 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 


[XS] Change in osmo-tetra[master]: Fix preventing crashes when -d missing

2025-12-16 Thread pespin
Attention is currently required from: wbokslag.

pespin has posted comments on this change by wbokslag. ( 
https://gerrit.osmocom.org/c/osmo-tetra/+/41679?usp=email )

Change subject: Fix preventing crashes when -d missing
..


Patch Set 1:

(1 comment)

File src/lower_mac/tetra_lower_mac.c:

https://gerrit.osmocom.org/c/osmo-tetra/+/41679/comment/646119a5_fa594d36?usp=email
 :
PS1, Line 198:  if (tms->cur_burst.is_traffic && (type == TPSAP_T_SCH_F || 
(blk_num == BLK_2 && !tms->cur_burst.blk2_stolen)) && tms->dumpdir) {
line too large, I'd say put every condition between && in a new line.



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

Gerrit-MessageType: comment
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I6a857f62aae542b054cbb474594359da626762bb
Gerrit-Change-Number: 41679
Gerrit-PatchSet: 1
Gerrit-Owner: wbokslag 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: wbokslag 
Gerrit-Comment-Date: Tue, 16 Dec 2025 14:56:46 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No


[XS] Change in osmo-tetra[master]: Fix preventing crashes when -d missing

2025-12-16 Thread wbokslag
wbokslag has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-tetra/+/41679?usp=email )


Change subject: Fix preventing crashes when -d missing
..

Fix preventing crashes when -d missing

Small fix that check whether a dumpdir was provided with -d. If not,
no voice data is written to file.

Change-Id: I6a857f62aae542b054cbb474594359da626762bb
---
M src/lower_mac/tetra_lower_mac.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-tetra refs/changes/79/41679/1

diff --git a/src/lower_mac/tetra_lower_mac.c b/src/lower_mac/tetra_lower_mac.c
index f8e7810..4775188 100644
--- a/src/lower_mac/tetra_lower_mac.c
+++ b/src/lower_mac/tetra_lower_mac.c
@@ -194,8 +194,8 @@
if (tms->cur_burst.is_traffic && type == TPSAP_T_NDB && blk_num == 
BLK_1)
tms->cur_burst.blk1_stolen = true;

-   /* If this is a traffic channel, dump. */
-   if (tms->cur_burst.is_traffic && (type == TPSAP_T_SCH_F || (blk_num == 
BLK_2 && !tms->cur_burst.blk2_stolen))) {
+   /* If this is a traffic channel and we have a dump output directory, 
dump. */
+   if (tms->cur_burst.is_traffic && (type == TPSAP_T_SCH_F || (blk_num == 
BLK_2 && !tms->cur_burst.blk2_stolen)) && tms->dumpdir) {
char fname[PATH_MAX];
int16_t block[690];
FILE *f;

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

Gerrit-MessageType: newchange
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I6a857f62aae542b054cbb474594359da626762bb
Gerrit-Change-Number: 41679
Gerrit-PatchSet: 1
Gerrit-Owner: wbokslag