Patch Set 1: (2 comments)
https://gerrit.osmocom.org/#/c/7625/1/include/osmocom/gsm/gsm0480.h File include/osmocom/gsm/gsm0480.h: Line 77: uint8_t ussd_data[GSM0480_USSD_OCTET_STRING_LEN]; > why do we have the new fields in addition to the old fields? Can a single > why do we have the new fields in addition to the old fields? It's described in the commit message. My use case is: when an USSD message is transfered via MAP / GSUP, it *shall* contain DCS (see 7.6.4.36, 3GPP TS 09.02). The length is also important to have, because you cannot apply 'strlen' to raw coded bytes. > Can a single message contain both text and data? Unlike a call related SS-message, it can't (see 2.2.6.2, 3GPP TS 04.10). As documented, this structure *represents* the content of a GSM 04.80 message, so it would contain the data in both original (ussd_data) and decoded (ussd_text) representations. > It's useful to have the raw data and the decoded text > (if any) in parallel in this structure? Exactly! ;) I could remove the old field, but this would break the API. Let's keep it for compatibility. https://gerrit.osmocom.org/#/c/7625/1/src/gsm/gsm0480.c File src/gsm/gsm0480.c: Line 593: num_chars = GSM0480_USSD_OCTET_STRING_LEN; > I'm not sure silent truncation is a good idea. This should IMHO at least l Agree with you. Probably, would be better to print a error and then reject the message. But, this is unrelated to this change and was introduced before. > What are your thoughts? Let's do this in a separate change. -- To view, visit https://gerrit.osmocom.org/7625 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia193d175021e145bb3b131290231f307dbefc64a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy <axilira...@gmail.com> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy <axilira...@gmail.com> Gerrit-HasComments: Yes