pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39709?usp=email )
Change subject: route: osmo_ss7_route_name(): Use osmo_ss7_pointcode_print_buf() ......................................................................
route: osmo_ss7_route_name(): Use osmo_ss7_pointcode_print_buf()
This allows callers to call osmo_ss7_route_name() together with osmo_ss7_pointcode_print() and osmo_ss7_pointcode_print2() in the same LOG line.
Change-Id: Iccbd83eeaa0e1c2a6078ece8d5c6d7af6fd9d71a --- M src/osmo_ss7_route.c 1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/09/39709/1
diff --git a/src/osmo_ss7_route.c b/src/osmo_ss7_route.c index f75e32a..7783f85 100644 --- a/src/osmo_ss7_route.c +++ b/src/osmo_ss7_route.c @@ -286,6 +286,8 @@ const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps) { static char buf[256]; + char pc_str[MAX_PC_STR_LEN]; + char mask_str[MAX_PC_STR_LEN]; char *pos = buf; struct osmo_ss7_instance *inst; size_t l; @@ -304,8 +306,8 @@ } while (0)
APPEND("pc=%u=%s mask=0x%x=%s", - rt->cfg.pc, osmo_ss7_pointcode_print(inst, rt->cfg.pc), - rt->cfg.mask, osmo_ss7_pointcode_print2(inst, rt->cfg.mask)); + rt->cfg.pc, osmo_ss7_pointcode_print_buf(pc_str, sizeof(pc_str), inst, rt->cfg.pc), + rt->cfg.mask, osmo_ss7_pointcode_print_buf(mask_str, sizeof(mask_str), inst, rt->cfg.mask));
if (rt->dest.as) { struct osmo_ss7_as *as = rt->dest.as;