Attention is currently required from: fixeria, lynxis lazus.
pespin has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40692?usp=email )
Change subject: routing area: add LOGRA() logging macro ......................................................................
Patch Set 2: Code-Review-1
(2 comments)
File include/osmocom/sgsn/gprs_routing_area.h:
https://gerrit.osmocom.org/c/osmo-sgsn/+/40692/comment/22cec5d5_4bf9d529?usp... : PS2, Line 15: char __log_rai_buf[32]; \ are you sure 32 is enough? sounds a bit tight.
https://gerrit.osmocom.org/c/osmo-sgsn/+/40692/comment/a9bceb67_fccc7979?usp... : PS2, Line 16: osmo_rai_name2_buf
Why not using `osmo_rai_name2()` here? I guess to allow the macro user to use it?
Yeah, I had similar problems in libosmo-sigtran. I'm in favour of using _buf() here.
But: since osmo_rai_name2_buf() returns a char*, do move this call inside LOGP(), so the encoding only happens if logged based on category+loglevel thanks to macro.