lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/43466?usp=email )
Change subject: RFC: libvlr: use a talloc_zero instead of OTC_SELECT ......................................................................
RFC: libvlr: use a talloc_zero instead of OTC_SELECT
Use a temporary talloc object for a rare error message instead of using OTC_SELECT which requires the usage of a different osmo_loop
Change-Id: I879b7ac6126d896a7bdae7ab4cbfe0655ac35760 --- M src/libvlr/vlr.c 1 file changed, 7 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/66/43466/1
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index cc03f93..a7134ce 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -599,10 +599,13 @@ struct vlr_instance *vlr = exists->vlr; int i; int j; - LOGVSUBP(LOGL_NOTICE, vsub, - "There is an existing subscriber for IMSI %s used by %s, replacing with this VLR subscr, used by %s\n", - exists->imsi, osmo_use_count_to_str_c(OTC_SELECT, &exists->use_count), - osmo_use_count_to_str_c(OTC_SELECT, &vsub->use_count)); + void *tmp = talloc_zero_size(vsub, 4); + LOGVLR(LOGL_NOTICE, + "There is an existing subscriber for IMSI %s used by %s, replacing with new VLR subscr: %s used by %s\n", + exists->imsi, osmo_use_count_to_str_c(tmp, &exists->use_count), + vlr_subscr_name(vsub), + osmo_use_count_to_str_c(tmp, &vsub->use_count)); + talloc_free(tmp);
if (!vsub->msisdn[0]) OSMO_STRLCPY_ARRAY(vsub->msisdn, exists->msisdn);