Attention is currently required from: daniel, fixeria, laforge, lynxis lazus, osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/42219?usp=email )
Change subject: Use talloc to allocate asn1c decoded structs ......................................................................
Patch Set 2:
(1 comment)
File src/tcap.c:
https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/42219/comment/2e115e04_93b7... : PS2, Line 29: vo In the case of osmo-iuh + osmo-hnbgw, I see osmo-iuh defining talloc_asn1_ctx and osmo-hnbgw declaring it as extern, which imho is not a good solution, specially given than use of libosmo-asn1-tcap in libosmo-sigtran is private. So following this approach an app using libosmo-sigtran and libosmo-asn1-tcap would need to know that libosmo-sgitran uses libosmo-asn1-tcap internally and hence avoid declaring the pointer. This all looks like a mess to me.
I guess if they are all defined as weak, it should work? Haven't tested it yet, though.
But as mentioned above, defining it as weak actually deceives the reason to have the global symbol in first place, apps are still not required to set it, so we are in the same position as with using a real function API.
I'm happy to change it to whatever specific method works better, but tbh I see many drawbacks in the proposal to be worth it.