osmith has uploaded this change for review.
csd_bs_list_to_gsm0808_ct: assert -> ret -EINVAL
Instead of asserting on an empty list of bearer services, return
-EINVAL. This makes the function more similar to
sdp_audio_codecs_to_gsm0808_channel_type which also doesn't assert if
an empty list of codecs is passed.
Related: OS#4394
Change-Id: I15a389e1f7a9d3d17b6531c9836d3d5f9d148267
---
M src/libmsc/csd_bs.c
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/71/34171/1
diff --git a/src/libmsc/csd_bs.c b/src/libmsc/csd_bs.c
index 3a2c82a..caea057 100644
--- a/src/libmsc/csd_bs.c
+++ b/src/libmsc/csd_bs.c
@@ -382,7 +382,8 @@
.ch_indctr = GSM0808_CHAN_DATA,
};
- OSMO_ASSERT(list->count);
+ if (!list->count)
+ return -EINVAL;
if (csd_bs_is_transp(list->bs[0])) {
ct->data_transparent = true;
To view, visit change 34171. To unsubscribe, or for help writing mail filters, visit settings.