Change in osmo-hlr[master]: fix USSD routing to multiple MSC

Vadim Yanitskiy gerrit-no-reply at
Fri Apr 5 19:34:50 UTC 2019

Vadim Yanitskiy has posted comments on this change. ( )

Change subject: fix USSD routing to multiple MSC

Patch Set 5: Code-Review-1

File src/hlr_ussd.c:
PS5, Line 238: ss->subscr
This will always remain NULL, because AFAICS you never set this pointer...
PS5, Line 251: return -EINVAL;
memleak: msg was allocated dynamically, so here you need to free it.
PS5, Line 260: return -EINVAL;
same here.
PS5, Line 263: USSD
'SS/USSD' would be more correct, as we would also deal with "structured" Supplementary Services some day.
PS5, Line 286: resp_msg = gsm0480_msgb_alloc_name(__func__);
So here we allocate a message buffer on heap...

BTW (off-topic): why do we use gsm0480_msgb_alloc_name()? We have nothing to do with GSM 04.80 at the HLR - it's only used to encapsulate the SS payload between MS and MSC. This is not that critical, but may be misleading.

Also, gsm0480_msgb_alloc_name() allocates a smaller buffer:

  return msgb_alloc_headroom(1024, 128, name);

than osmo_gsup_client_msgb_alloc() does:

  return msgb_alloc_headroom(4000, 64, __func__);

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I18067bfadd33a6bc59a9ee336b6937313826fce3
Gerrit-Change-Number: 13479
Gerrit-PatchSet: 5
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at>
Gerrit-Reviewer: osmith <osmith at>
Gerrit-Comment-Date: Fri, 05 Apr 2019 19:34:50 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list