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/+/40698?usp=email )
Change subject: mmctx: LOGIUP: allow ue to be NULL ......................................................................
Patch Set 1: Code-Review-1
(2 comments)
File include/osmocom/sgsn/mmctx.h:
https://gerrit.osmocom.org/c/osmo-sgsn/+/40698/comment/c039c893_ebabc67d?usp... : PS1, Line 236: ue->conn_id
idea for a separate patch: `(ue)->conn_id`
Yes please @lynxis@fe80.eu edit this patch and add the parenthesis.
https://gerrit.osmocom.org/c/osmo-sgsn/+/40698/comment/62a8a08f_2b4fcff5?usp... : PS1, Line 238: {}
I would not print curly braces in the case of `NULL` at all.
We tend to do this null case as a "(ue) ? foo : bar". This has the advantage that the whole logic is only executed in case there's a logging happening due to level+category being logged, thanks to macro expansion.
With your approach you are always running through at least an if+else. Please rework it.