Attention is currently required from: laforge, fixeria, dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31417 )
Change subject: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload ......................................................................
Patch Set 6:
(4 comments)
File src/common/l1sap.c:
https://gerrit.osmocom.org/c/osmo-bts/+/31417/comment/0a00aaf2_241cdc79 PS6, Line 1274: if (OSMO_UNLIKELY((resp_msg->len != GSM_HR_BYTES + 1) && rfc5993)) { Should this be: "OSMO_UNLIKELY((resp_msg->len != GSM_HR_BYTES + 1) && !ts101318)"
You are not interested on whether the BTS supports the other type, instead you are interested in knowing if the received format is not supported?
https://gerrit.osmocom.org/c/osmo-bts/+/31417/comment/24136ea7_28b857fc PS6, Line 1279: } else if (OSMO_UNLIKELY((resp_msg->len != GSM_HR_BYTES) && ts101318)) { same here, !rfc5993
https://gerrit.osmocom.org/c/osmo-bts/+/31417/comment/1a8a9154_dfa6e64e PS6, Line 1940: if (lchan->type == GSM_LCHAN_TCH_H && rtp_pl_len == GSM_HR_BYTES please break each condition into one line with uniform formatting.
https://gerrit.osmocom.org/c/osmo-bts/+/31417/comment/cbde0555_eca145a5 PS6, Line 1950: } else if (lchan->type == GSM_LCHAN_TCH_H && rtp_pl_len == GSM_HR_BYTES + 1 I see you are using "GSM_HR_BYTES" and "GSM_HR_BYTES + 1" in several places.
It would be far cleared if you added defines for those (they can be at the start if this C file for instance). For instance something like: GSM_HR_BYTES_RTP_RFC5993 (GSM_HR_BYTES) GSM_HR_BYTES_RTP_TS101318 (GSM_HR_BYTES + 1)
BTW, you are checking twice that "lchan->type == GSM_LCHAN_TCH_H", make levels of checks.