pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/42220?usp=email )
Change subject: Introduce API osmo_asn1_tcap_set_talloc_ctx() ...................................................................... Introduce API osmo_asn1_tcap_set_talloc_ctx() Related: SYS#5423 Related: OS#6965 Change-Id: I206d401efc7ae7680ac2eff75ee062b9b2676a58 --- A TODO-RELEASE M include/osmocom/tcap/tcap.h M src/tcap.c 3 files changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-asn1-tcap refs/changes/20/42220/1 diff --git a/TODO-RELEASE b/TODO-RELEASE new file mode 100644 index 0000000..078ec17 --- /dev/null +++ b/TODO-RELEASE @@ -0,0 +1,10 @@ +# When cleaning up this file: bump API version in corresponding Makefile.am and rename corresponding debian/lib*.install +# according to https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release +# In short: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info +# LIBVERSION=c:r:a +# If the library source code has changed at all since the last update, then increment revision: c:r + 1:a. +# If any interfaces have been added, removed, or changed since the last update: c + 1:0:a. +# If any interfaces have been added since the last public release: c:r:a + 1. +# If any interfaces have been removed or changed since the last public release: c:r:0. +#library what description / commit summary line +libosmo-asn1-tcap add osmo_asn1_tcap_set_talloc_ctx() diff --git a/include/osmocom/tcap/tcap.h b/include/osmocom/tcap/tcap.h index 309f283..92f05fd 100644 --- a/include/osmocom/tcap/tcap.h +++ b/include/osmocom/tcap/tcap.h @@ -6,6 +6,8 @@ #include <osmocom/tcap/TCAP_TCMessage.h> +void *osmo_asn1_tcap_set_talloc_ctx(void *tall_ctx); + int osmo_asn1_tcap_decode(struct TCAP_TCMessage *tcapmsg, const uint8_t *data, size_t data_len); void osmo_asn1_tcap_TCMessage_free_contents(struct TCAP_TCMessage *tcapmsg); diff --git a/src/tcap.c b/src/tcap.c index f5303ac..be9f960 100644 --- a/src/tcap.c +++ b/src/tcap.c @@ -28,6 +28,13 @@ void *tcap_talloc_asn1_ctx; +void *osmo_asn1_tcap_set_talloc_ctx(void *tall_ctx) +{ + void *prev_talloc_ctx = tcap_talloc_asn1_ctx; + tcap_talloc_asn1_ctx = tall_ctx; + return prev_talloc_ctx; +} + int osmo_asn1_tcap_decode(struct TCAP_TCMessage *tcapmsg, const uint8_t *data, size_t data_len) { -- To view, visit https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/42220?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-asn1-tcap Gerrit-Branch: master Gerrit-Change-Id: I206d401efc7ae7680ac2eff75ee062b9b2676a58 Gerrit-Change-Number: 42220 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <[email protected]>
