diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-03-26 20:52:27 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-03-26 20:52:27 +0200 |
commit | a9b94bd8b9fc31ba80294da1d67a6261ed7856cc (patch) | |
tree | 5efedeb0c85bfc83c81a58a836c25f2e01205ab6 /titan | |
parent | 1945a75292daac6ae01b90d0e3d50d8be92d13a7 (diff) |
MNCC_EncDec.cc: Fix decoding of speech versions in bearer capabilities
Diffstat (limited to 'titan')
-rw-r--r-- | titan/MNCC_EncDec.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/titan/MNCC_EncDec.cc b/titan/MNCC_EncDec.cc index cdfe3ed..b4937e7 100644 --- a/titan/MNCC_EncDec.cc +++ b/titan/MNCC_EncDec.cc @@ -47,8 +47,11 @@ static MNCC__bearer__cap dec_bcap(const struct gsm_mncc_bearer_cap *in) (GSM48__bcap__transp) in->data.transp, (GSM48__bcap__modem__type) in->data.modem_type); - for (unsigned int i = 0; i < ARRAY_SIZE(in->speech_ver); i++) - vers[0] = in->speech_ver[0]; + for (unsigned int i = 0; i < ARRAY_SIZE(in->speech_ver); i++) { + vers[i] = in->speech_ver[i]; + if (vers[i] == -1) + break; + } return MNCC__bearer__cap(in->transfer, in->mode, in->coding, in->radio, in->speech_ctm, vers, data); |