Change in osmo-hlr[master]: fix USSD routing to multiple MSC
gerrit-no-reply at lists.osmocom.org
Sat Apr 6 15:14:56 UTC 2019
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13479 )
Change subject: fix USSD routing to multiple MSC
Patch Set 5: Code-Review-1
current patch set has more holes than a swiss cheese, but I have a better idea...
PS5, Line 175: struct osmo_timer_list subscr_timeout;
let's take this ss->subscr from the top. I had a very simple idea in mind, but it wasn't thought through properly, confused you guys and has now mutated to a timeouted cache of stale data... Let's drop this again.
Here is a probably much better approach:
- store only the MSC name in ss->.
- For all MO USSD sessions, store the originating MSC's vlr_name in ss-> on the first message coming in from the MSC/VLR. Whatever happens, always route back to that MSC name: all errors and replies. This should then prevent all additional database lookups.
- For MT USSD sessions, there will be no MSC's vlr_name stored in ss-> at first. Do a db lookup for routing to the right vlr_name, store it in ss->vlr_name.
Hence we will hit the db for routing at most once per ss_session, will not keep any other stale subscr state, don't need timers.
PS5, Line 251: return -EINVAL;
> memleak: msg was allocated dynamically, so here you need to free it.
PS5, Line 254: osmo_timer_schedule(&ss->subscr_timeout, OSMO_SESSION_SUBSCRIBER_CACHE_TIMEOUT, 0);
(this was not even assigning anything to ss->subscr)
PS5, Line 263: USSD
> 'SS/USSD' would be more correct, as we would also deal with "structured" Supplementary Services some […]
(ack, I have no good idea about naming here)
PS5, Line 286: resp_msg = gsm0480_msgb_alloc_name(__func__);
> So here we allocate a message buffer on heap... […]
agree, but separate patch.
PS5, Line 343: osmo_timer_schedule(&ss->subscr_timeout, OSMO_SESSION_SUBSCRIBER_CACHE_TIMEOUT, 0);
(setting ss->subscr to point at local struct subscr becomes invalid memory as soon as the function exits)
To view, visit https://gerrit.osmocom.org/13479
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Comment-Date: Sat, 06 Apr 2019 15:14:56 +0000
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gerrit-log