osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/34171 )
Change subject: csd_bs_list_to_gsm0808_ct: assert -> ret -EINVAL ......................................................................
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(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved
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;