dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32370 )
Change subject: e1d: close fd when osmo_fd_setup fails
......................................................................
e1d: close fd when osmo_fd_setup fails
When osmo_fd_register() fails we just exit but the file descriptor stays
open. A file descriptor in this state does not work. Let's close the file
descriptor
Change-Id: I6b41e5ad8511f2d4e524979631a91ab23dc0b23f
---
M src/input/e1d.c
1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/70/32370/1
diff --git a/src/input/e1d.c b/src/input/e1d.c
index 1296b52..b91d02e 100644
--- a/src/input/e1d.c
+++ b/src/input/e1d.c
@@ -509,6 +509,8 @@
if (ret < 0) {
LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "could not register FD: %s\n", strerror(ret));
talloc_free(ts_info);
+ close(bfd->fd);
+ bfd->fd = 0;
return ret;
}
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32370
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I6b41e5ad8511f2d4e524979631a91ab23dc0b23f
Gerrit-Change-Number: 32370
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32372 )
Change subject: e1d: better initialize g_e1d with NULL.
......................................................................
e1d: better initialize g_e1d with NULL.
The global variable g_e1d is populated during the first line update and
the line update checks if the variable is NULL. Let's better initialize
the variable with NULL to be on the safe side.
Change-Id: If3b808e5489bf6a1f5fa4326d7b0277cc66d1334
---
M src/input/e1d.c
1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/72/32372/1
diff --git a/src/input/e1d.c b/src/input/e1d.c
index ba7791f..1fd18c9 100644
--- a/src/input/e1d.c
+++ b/src/input/e1d.c
@@ -42,7 +42,7 @@
#define TS_SIGN_ALLOC_SIZE 300
-struct osmo_e1dp_client *g_e1d;
+struct osmo_e1dp_client *g_e1d = NULL;
static int invertbits = 1;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32372
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: If3b808e5489bf6a1f5fa4326d7b0277cc66d1334
Gerrit-Change-Number: 32372
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32371 )
Change subject: e1d: set fd number back to 0 on failure
......................................................................
e1d: set fd number back to 0 on failure
When osmo_e1dp_client_ts_open fails to return a valid file descriptor,
let's set bfd->fd back to 0. This will not change the current behavior
but leaves bfd->fd in a clean state.
Change-Id: Ic49e93550f0cff1a30644408ef7dc0648be768df
---
M src/input/e1d.c
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/71/32371/1
diff --git a/src/input/e1d.c b/src/input/e1d.c
index b91d02e..ba7791f 100644
--- a/src/input/e1d.c
+++ b/src/input/e1d.c
@@ -444,6 +444,7 @@
if (bfd->fd < 0) {
LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Could not open timeslot %d\n", ts);
talloc_free(ts_info);
+ bfd->fd = 0;
return -EIO;
}
bfd->when = OSMO_FD_READ;
@@ -474,6 +475,7 @@
if (bfd->fd < 0) {
LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Could not open timeslot %d\n", ts);
talloc_free(ts_info);
+ bfd->fd = 0;
return -EIO;
}
bfd->when = OSMO_FD_READ;
@@ -498,6 +500,7 @@
if (bfd->fd < 0) {
LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Could not open timeslot %d\n", ts);
talloc_free(ts_info);
+ bfd->fd = 0;
return -EIO;
}
bfd->when = OSMO_FD_READ;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32371
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ic49e93550f0cff1a30644408ef7dc0648be768df
Gerrit-Change-Number: 32371
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32368
to look at the new patch set (#2).
Change subject: bsc: TC_assignment_csd: test non-transp data rates
......................................................................
bsc: TC_assignment_csd: test non-transp data rates
Related: OS#4393
Change-Id: I2dce9486f3528a79bdea09bdbc1f02833e6bedc0
---
M bsc/BSC_Tests.ttcn
1 file changed, 24 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/68/32368/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32368
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2dce9486f3528a79bdea09bdbc1f02833e6bedc0
Gerrit-Change-Number: 32368
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32369 )
Change subject: CSD: support non-transparent data rates
......................................................................
CSD: support non-transparent data rates
Implement gsm0808_data_rate_non_transp_to_gsm0408 and add
GSM48_CMODE_DATA_43k5 to all related switch statements, as it can be
returned from gsm0808_data_rate_non_transp_to_gsm0408. All other
GSM48_CMODE_DATA_* are already in the switch statements.
Related: OS#4393
Change-Id: Ib5f4bdf17a9833f65a0b623a033da838a2594d68
---
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/data_rate_pref.c
M src/osmo-bsc/gsm_data.c
M src/osmo-bsc/lchan_rtp_fsm.c
M src/osmo-bsc/lchan_select.c
6 files changed, 43 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/69/32369/1
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 37f0e81..c2b3bd9 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -456,6 +456,7 @@
case GSM48_CMODE_SPEECH_AMR:
cm->chan_rate = RSL_CMOD_SP_GSM3;
break;
+ case GSM48_CMODE_DATA_43k5:
case GSM48_CMODE_DATA_32k0:
case GSM48_CMODE_DATA_29k0:
case GSM48_CMODE_DATA_14k5:
@@ -2697,6 +2698,7 @@
int ipacc_payload_type(enum gsm48_chan_mode tch_mode, enum gsm_chan_t type)
{
switch (gsm48_chan_mode_to_non_vamos(tch_mode)) {
+ case GSM48_CMODE_DATA_43k5:
case GSM48_CMODE_DATA_32k0:
case GSM48_CMODE_DATA_29k0:
case GSM48_CMODE_DATA_14k5:
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index b631767..1cb96e5 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -363,6 +363,7 @@
case GSM48_CMODE_DATA_14k5:
case GSM48_CMODE_DATA_29k0:
case GSM48_CMODE_DATA_32k0:
+ case GSM48_CMODE_DATA_43k5:
case GSM48_CMODE_SPEECH_EFR:
/* these services all explicitly require a TCH/F */
return type == GSM_LCHAN_TCH_F;
@@ -380,6 +381,7 @@
static int chan_mode_to_ch_indctr(enum gsm48_chan_mode chan_mode)
{
switch (gsm48_chan_mode_to_non_vamos(chan_mode)) {
+ case GSM48_CMODE_DATA_43k5:
case GSM48_CMODE_DATA_32k0:
case GSM48_CMODE_DATA_29k0:
case GSM48_CMODE_DATA_14k5:
diff --git a/src/osmo-bsc/data_rate_pref.c b/src/osmo-bsc/data_rate_pref.c
index 2c98169..977c53c 100644
--- a/src/osmo-bsc/data_rate_pref.c
+++ b/src/osmo-bsc/data_rate_pref.c
@@ -76,10 +76,27 @@
}
}
-static int gsm0808_data_rate_non_transp_to_gsm0408(enum gsm0808_data_rate_non_transp rate)
+static int gsm0808_data_rate_non_transp_to_gsm0408(enum gsm0808_data_rate_non_transp rate, bool full_rate)
{
- LOGP(DMSC, LOGL_ERROR, "%s is not implemented\n", __func__); /* FIXME */
- return -1;
+ switch (rate) {
+ case GSM0808_DATA_RATE_NON_TRANSP_12000_6000:
+ if (full_rate)
+ return GSM48_CMODE_DATA_12k0;
+ return GSM48_CMODE_DATA_6k0;
+ case GSM0808_DATA_RATE_NON_TRANSP_43k5:
+ return GSM48_CMODE_DATA_43k5;
+ case GSM0808_DATA_RATE_NON_TRANSP_29k0:
+ return GSM48_CMODE_DATA_29k0;
+ case GSM0808_DATA_RATE_NON_TRANSP_14k5:
+ return GSM48_CMODE_DATA_14k5;
+ case GSM0808_DATA_RATE_NON_TRANSP_12k0:
+ return GSM48_CMODE_DATA_12k0;
+ case GSM0808_DATA_RATE_NON_TRANSP_6k0:
+ return GSM48_CMODE_DATA_6k0;
+ default:
+ LOGP(DMSC, LOGL_ERROR, "Unsupported non-transparent data rate 0x%x\n", rate);
+ return -1;
+ }
}
static int gsm0808_data_rate_non_transp_to_gsm0858(enum gsm0808_data_rate_non_transp rate, bool full_rate)
@@ -146,7 +163,7 @@
return -1;
ch_mode_rate->data_rate.nt = rc;
- rc = gsm0808_data_rate_non_transp_to_gsm0408(ct->data_rate);
+ rc = gsm0808_data_rate_non_transp_to_gsm0408(ct->data_rate, full_rate);
if (rc == -1)
return -1;
ch_mode_rate->chan_mode = rc;
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 1e132f4..fc3148c 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -1034,6 +1034,7 @@
case GSM48_CMODE_SPEECH_EFR:
case GSM48_CMODE_SPEECH_AMR:
return RSL_CMOD_SPD_SPEECH;
+ case GSM48_CMODE_DATA_43k5:
case GSM48_CMODE_DATA_32k0:
case GSM48_CMODE_DATA_29k0:
case GSM48_CMODE_DATA_14k5:
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index 8b6faad..fa398bf 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -871,6 +871,7 @@
static enum mgcp_codecs chan_mode_to_mgcp_codec(enum gsm48_chan_mode chan_mode, bool full_rate)
{
switch (gsm48_chan_mode_to_non_vamos(chan_mode)) {
+ case GSM48_CMODE_DATA_43k5:
case GSM48_CMODE_DATA_32k0:
case GSM48_CMODE_DATA_29k0:
case GSM48_CMODE_DATA_14k5:
diff --git a/src/osmo-bsc/lchan_select.c b/src/osmo-bsc/lchan_select.c
index 9e0da86..8b9b81a 100644
--- a/src/osmo-bsc/lchan_select.c
+++ b/src/osmo-bsc/lchan_select.c
@@ -184,6 +184,7 @@
/* fall through */
case GSM48_CMODE_SPEECH_V1:
case GSM48_CMODE_SPEECH_AMR:
+ case GSM48_CMODE_DATA_43k5:
case GSM48_CMODE_DATA_32k0:
case GSM48_CMODE_DATA_29k0:
case GSM48_CMODE_DATA_14k5:
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32369
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ib5f4bdf17a9833f65a0b623a033da838a2594d68
Gerrit-Change-Number: 32369
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin, fixeria.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32364 )
Change subject: bsc: TC_assignment_csd: split into two tests
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> I am not sure I'm understanding this patch. […]
Preserving existing functionality from my earlier patch:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31557
But given that it makes more sense to just test all data rates in one function (as you noted in https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32365/1), there is no need for this patch and I'll abandon it.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32364
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I052685d36d9fc794502b6fe2c444b95ebac8dfc4
Gerrit-Change-Number: 32364
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 19 Apr 2023 14:40:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin, fixeria.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32365 )
Change subject: bsc: TC_assignment_csd: test all transp data rates
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> I wonder if it would make more sense to have all of them in 1 test to speed up a bit everything. […]
yes it is significantly faster. on my machine, with non-transparent data rates also added, running them separately takes 161 seconds and running them all in one test takes 71 seconds. I've adjusted the patch.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32365
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9a5f0e630fefcafb1b26eabba73de7e76d9e7e5d
Gerrit-Change-Number: 32365
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 19 Apr 2023 14:39:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment