Patch Set 1:

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, 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,
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)

> 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.
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
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia193d175021e145bb3b131290231f307dbefc64a
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <>
Gerrit-Reviewer: Harald Welte <>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <>
Gerrit-HasComments: Yes

Reply via email to