This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/23054 ) Change subject: Add osmo_ss7_pointcode_print_buf() to API ...................................................................... Add osmo_ss7_pointcode_print_buf() to API Like osmo_ss7_pointcode_print(), but prints into an user-supplied buffer. Change-Id: I5fc7d7746eb90a9d404b6b50bf9ded6789a1c33c --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c 2 files changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/54/23054/1 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index a2263a2..b717d53 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -24,6 +24,7 @@ bool osmo_ss7_pc_is_local(struct osmo_ss7_instance *inst, uint32_t pc); int osmo_ss7_pointcode_parse(struct osmo_ss7_instance *inst, const char *str); int osmo_ss7_pointcode_parse_mask_or_len(struct osmo_ss7_instance *inst, const char *in); +const char *osmo_ss7_pointcode_print_buf(char *buf, size_t buf_len, const struct osmo_ss7_instance *inst, uint32_t pc); const char *osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc); const char *osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t pc); diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index a801cc9..5ff4ca4 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -260,7 +260,7 @@ return -EINVAL; } -const char *_osmo_ss7_pointcode_print(char *buf, size_t len, const struct osmo_ss7_instance *inst, uint32_t pc) +const char *osmo_ss7_pointcode_print_buf(char *buf, size_t len, const struct osmo_ss7_instance *inst, uint32_t pc) { const struct osmo_ss7_pc_fmt *pc_fmt; unsigned int num_comp_exp; @@ -287,7 +287,7 @@ const char *osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc) { static char buf[MAX_PC_STR_LEN]; - return _osmo_ss7_pointcode_print(buf, sizeof(buf), inst, pc); + return osmo_ss7_pointcode_print_buf(buf, sizeof(buf), inst, pc); } /* same as osmo_ss7_pointcode_print() but using a separate buffer, useful for multiple point codes in the @@ -295,7 +295,7 @@ const char *osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t pc) { static char buf[MAX_PC_STR_LEN]; - return _osmo_ss7_pointcode_print(buf, sizeof(buf), inst, pc); + return osmo_ss7_pointcode_print_buf(buf, sizeof(buf), inst, pc); } int osmo_ss7_pointcode_parse_mask_or_len(struct osmo_ss7_instance *inst, const char *in) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/23054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I5fc7d7746eb90a9d404b6b50bf9ded6789a1c33c Gerrit-Change-Number: 23054 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210223/bee1081d/attachment.htm>